How to update and upgrade different GNU/Linux distros

As the title suggest and I am going to show you how you could do it yourself..provided you run those distro and manage them. Anyway knowing them will not harm you a bit.

For this article I choose Arch Linux , Fedora , Gentoo , Debian distribution.So step by step I will show you the procedure.

First distribution is Arch Linux:

Because it is a “rolling release” model( Gentoo too!!) so you don’t have to get diffrent thing for every new update made by the developers attached to it’s development.Updating is the same as upgrading as a whole system wide approch. Upgrading to the individual package is very much possible.

Here we go:

bhaskar@bhaskar-laptop_08:36:21_Mon Aug 09:~> sudo pacman -Syu
:: Synchronizing package databases…
core is up to date
extra is up to date
community is up to date
archlinuxfr is up to date
:: Starting full system upgrade…
there is nothing to do

heck!! why doesn’t it spit out something more?? Because I have the habit of keep my OS updated as much as possible. So I had recently done the update and the OS is very much up to the mark.Now as you can see “pacman” is pacage manager binary to control thing. It consult a file called pacman.conf in the /etc/ directory to work with.Right! now you can see in the output that core,extra,community and archlinuxfr are the repositories defined in the file called pacman.conf. You can add many more if you want. Find out the details for that in the web site.

Second one is Gentoo:

Gentoo has same kind model like Arch i.e rolling release model. But the procedure is quite different.So here we go to show you the way:

root@bhaskar-laptop_09:20:37_Mon Aug 09:/ # sudo eix-sync

This “eix-sync” is wrapper around “emerge –sync” and has the ability to show what has changed since last time.I will not show you the output here because it is quite long.Behind scene it consult with the gentoo repositories.Once it fetched all the updated package from that repositories and   sync with the remote host,which contain those package.Now you need sync your system with the remote or update or upgrade your system with the latest thing available in the repositories.How do you that? here is the procedure to do that:

root@bhaskar-laptop_09:24:22_Mon Aug 09:/ # emerge –ask –verbose –newuse –deep –update world

These are the packages that would be merged, in order:

Calculating dependencies… done!

Total: 0 packages, Size of downloads: 0 kB

Nothing to merge; would you like to auto-clean packages? [Yes/No] y
>>> Auto-cleaning packages…

>>> No outdated packages were found on your system.

Now one more time I am really sorry that I am writing this post little different time. As I have already merge with the world a days back the out put suggest that it has nothing to do.If that were not done …then you can see the listing of packge need to be merge enlisted there and you have select yes for those packages to get into your system.Now a bit of explanation to those flag I passed in the command line.”–ask” this flag will ask you go ahed or I press yes in previous prompt… right? ok next one “ –verbose” is will spit out as much information as possiable to give you an idea what it would be. Third one “–newuse” ok this flag signifies what it means. That is use newer way of using the particular flag which might have been set beforehand or will be set now by default. Forth one “–deep” it signifies that it is going to verify and satisfy all the dependency require to build and installed those packages. Fifth one ” –update” pretty simple hah! you thing will update the existing packages what have already been installed in the system.But how does it find it?? Yes that is why the “world” parameter is there. it is a file reside in the path /var/lib/portage/world. So it will compare with that file and make the changes implemented in your system.

we are not yet done! yup if you are on Gentoo you need to take care of lot of thing by yourself…but believe me it’s will be enjoyable.

Now fire this:

root@bhaskar-laptop_09:41:04_Mon Aug 09:~ # revdep-rebuild
* Configuring search environment for revdep-rebuild

* Checking reverse dependencies
* Packages containing binaries and libraries broken by a package update
* will be emerged.

* Collecting system binaries and libraries

…. output snipped.

This fellow( revdep-rebuild) is healer. Because if the previous update made your system in inconsistent state and libraris are missing ..then this come to your rescue.It was invoked implicitly in the last step ..but one should do it onece more to make sure everything in place.Otherwise you might encounter that lot of program not working as expected.What it does?? it besically scan the system for missing link and broken links then allot those required files to the appropriate package.Then do a ” –oneshot” means it will not keep things recorded in the “world” file.Whatever you installed through emerge it will keep a record in the world fire,so when you update the system it will compare that file with the remote system for version check.Once it run you can find the sanity for your system.Now your system is uptodate and latest as the remote repositoris are.

Third one is Debian:

Aha! completely free OS.Updating is not same as upgrading the system.

Here are the steps:

root@bhaskar-laptop_08:38:24_Mon Aug 09:/ # aptitude update

What it does is get the compare with the repositories with system reserved sate.I f found changed then it will get it and apply it on the system.It will ask your consent before doing that.

Next to upgrade the system :

root@bhaskar-laptop_09:55:53_Mon Aug 09:/ # aptitude safe-upgrade

that is the way to upgrade from the present system to the future system.Like I have updated form Etch to Lenny(lot more steps required).

root@bhaskar-laptop_10:02:36_Mon Aug 09:/ # aptitude dist-upgrade

I think those stated commnd are good enough to get you going on GNU/Linux Debian.

Fourth one is Fedora:

So updating the system is quite diffrent from upgrading the system.First look in how to update.

root@bhaskar-laptop_10:04:03_Mon Aug 09:/ # yum update

It will do the trick for your. What it does that looking for the repo mentioned in the repos.d directory in the /etc/ and get things from there.You can enable thing you want .It will ask your consent to go ahead onece it fetch the packge to install or update.The good thing about “yum” is it will autometically resolve dependencies,which up2date failed to do.Once the system is up to date then fire the following:

root@bhaskar-laptop_10:09:08_Mon Aug 09:/ # yum upgrade

Which will essentially do the upgrade of your system as it enlist all the packges going to changed and instlled and upgraded.

Hope this will help.



About unixbhaskar
GNU/Linux Consultant

One Response to How to update and upgrade different GNU/Linux distros

  1. DistroLink says:

    thank you for your post!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: