Google Ad

Monday, July 02, 2007

Upgrading Ubuntu The Shorter Way

Today I decided to upgrade my system from Feisty to Gutsy the next release of Ubuntu.

The normal way to do an Ubuntu upgrade from an old release to a new release is to edit the "/etc/apt/sources.list" then replace all old release name to the new release name in the file. Quiet tedious if you ask me, because if you've a long list in your sources.list file, then it means you are going to sit for quiet long to effect the changes.

For me if I'm using vim to edit the file, I do this :%s /search_text/replace_text/g to quickly do the find and replacement. After, I save the file and do the normal "apt-get upgrade" and "apt-get dist-upgrade", then get some coffee, watch it as it upgrades.Seems shorter eh?

Now I suffer no more long and tedious process, all I have to do, is just type these at the shell prompt.

sudo sed -e 's/\ssearch_text/ replace_text/g' -i /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade

As I'm blogging now, the upgrade is in progress.It is just sweet.I'm hoping nothing goes breaks though. Thanks to this post

I did a "man sed" to find about the "sed" command. sed is a stream editor for filtering and transforming text. It is used to perform basic text transformations on an input stream. Notes taken from the man page. If you need more info about sed, then "man sed". If you know of any quicker way too, please include them as comment.

No comments: