Keeping your Gentoo box up to date

Written by Robert -

Here is a short description of keeping a Gentoo box up to date. There are many ways to do this, but this way is mine. This might not be the best way to do it on your system.

Without options, the output of emerge can be a bit overwelming for new users, as it shows the amount of packages. It's by default not optimised. But it's Gentoo, you are supposed to configure it yourself.

First sync emerge to ensure emerge has all the latest information:
emerge --sync

Review the configuration file changes:
dispatch-conf

Now we can start the upgrade of packages:
emerge -uDN @world --changed-use --tree --unordered-display --complete-graph --with-bdeps=y -j 8 --load-average 8 --quiet

-uDN
The u is the update switch, the D is for deep, the N is for newuse (checks for use flag changes).
--changed-use
Includes packages where use flags have changed since install.
--unordered-display
Makes it a bit more readable
--complete-graph
Makes sure it doesn't break dependencies.
-j
Amount of packages it can build at the same time. The handbook suggests cores or threads +1. If you have a multithreading CPU, use threads, if not, use cores. If you have a 2 core, 4 thread machine, the general advise is -j 5. Some users advise to just use the total ammount of threads or cores, so in that case, -j 4 would be best.
--load-average
I don't use this with arguments, so it removes a previous load limit.
-quiet
Reduces the output.

Now that's done, we can remove packages that aren't required anymore:
emerge -av --depclean

Let's review the configuration file changes again. It doesn't really need to be done twice, but I prefer it. dispatch-conf

Verify the Gentoo security advisory for all packages that are installed.
glsa-check -f all

Comments

Written by Ricardo Felix do Nascimento -

Great post