Ubuntu Karmic Koala – Clean Install vs Upgrade
November 9th, 2009 3 comments
So what’s the best solution to enjoy all the powerful features of a new release? Is a clean install better than a simple upgrade? In this article we’ll be trying to find an answer to these questions that seem to arise every time a new release comes out.
When we’re talking about Karmic Koala the biggest new feature is definitely speed. Sadly you won’t probably notice it by simply upgrading – for this you have to do a clean install. By default Karmic offers the ext4 filesystem which is the new stable filesystem for Linux. It was partially working already in Jaunty but due to its unstability is was kept as an option, ext3 was still used by default. Also GRUB 2 is released with Karmic, which offers much more flexibility than the older version.
Upgrading
The easiest solution is to use the package manager to download and install all the packages of the new release. That way you don’t have to mess around with backing up all your files, saving your settings and in the worst case – lose all your work. By this I mean when you should forget to backup something vital. This has happened to me a few times!
With the help of the wonderful package manager you can have your machine running the new release usually in a half an hour (depending on the download speeds).
There are also a few negative aspects in upgrading – you might lose out in some of the new features. Sure mostly your Ubuntu will run on all the new gizmos and gadgets, new version of Firefox and OpenOffice. But you won’t notice some major differences when doing a clean install! To use ext4 and GRUB 2 you’ll have to do some modifying on your own. It’s only recommended for users who know their way around Linux.
Clean install
Why is this method always so scary to most people? Mostly because they’re concerned about losing all their settings, files etc. But you don’t have to – you can import them right into the new release with the help of backing up a few things.
In Ubuntu most of your settings and data is in your /home/USERNAME/ folder. Either in a hidden status or not. This should be the first thing to backup. The second thing for me was all my Filezilla Site Manager entries and Firefox bookmarks. And that’s basically it! Always double-check so that nothing vital won’t be lost. Some people suggest using tar for backing up your home folder to preserve the filesystem tree and also keep the permissions. Since I haven’t really gone into that I won’t be discussing it here.
Another good idea is to keep a list of all your packages that you’ve added over time. This is done by the following command:
sudo dpkg --get-selections > /home/USERNAME/packages.backup |
If you’ve also added some extra sources backup your /etc/apt/sources.list file.
After you’ve finished with your clean install simply import the sources file and run this command:
sudo dpkg --set-selections /home/USERNAME/packages.backup && apt-get dselect-upgrade |
Now you can start enjoying all the features of a new release and feel like using a brand new computer.
My experiences
I started using Ubuntu with 8.10 Intrepid Ibex. Since then I had only upgraded without doing a clean install. So my laptop was pretty stuffed up with a lot of old packages, unused Wine applications and many other useless old things. So as a habit I also upgraded to Karmic.
After reading about all the new features and other peoples suggestions I decided to get rid of all the junk and make a clean install. This was actually this weekend. The time I spent for backing up, installing the new release and having my freshly installed Ubuntu up and running with my needed packages and applications took me only a few measly hours. All I did was backup my home folder, Filezilla data and Firefox bookmarks onto an external drive. I didn’t want to start messing around with all the packages from my previous version. Those few hours were nothing compared to the feeling I had – it was totally like using a new computer.
In conclusion
So in conclusion my suggestion would be to do a clean install for every new release. Since after every 6 months a new version is released it’s a perfect interval to keep your computer running smooth and fast.
Question. If I backup /etc/apt/sources.list then what happens to the associated “key” files? Don’t the repositories have to be re-authenticated? And if so, then how?
I would like to do a fresh install if only to upgrade my 32 bit installation to the 64 bit that my machine supports.
Don Birdsall´s last blog ..LiveCD’s and MD5SUMS – A Tutorial
That’s a good point Don!
Since I didn’t backup the sources file personally I hadn’t even thought about that.
After some searching I found this article http://artanis00.blogspot.com/2009/08/getting-sources-source-keys-and-package.html which should be of some help.
sudo dpkg –set-selections /home/USERNAME/packages.backup
Should be;
sudo dpkg –set-selections < /home/USERNAME/packages.backup
BTW, adding keys again is fairly simple:
sudo apt-key adv –keyserver KEYSERVER –recv-keys KEYID
KEYSERVER can be: keyserver.ubuntu.com or wwwkeys.eu.pgp.net and others, although I only use these two servers. KEYID speaks for itself :)
Wesley Schwengle´s last blog ..Once Upon a School..