Gentoo turns 10 today, and so I figured I’d make a post about one of my favorite aspects of Gentoo: the world file.
Such a simple idea and yet most package management systems seem to lack it.
When you install a package, it gets recorded in the world file, but its dependencies do not. This means you can always figure out which packages you need/don’t need.
Contrast this with many other package management systems, who do not distinguish between packages specifically installed by name by the user and those pulled in as dependencies.
After some time passes and you install and remove packages, you wind up with a bunch of packages that you are not sure if they’re necessary or not.
With gentoo, you can simply do a
emerge --pretend --depclean
On an up-to-date system to see which packages the system thinks are no longer needed. You can then rerun without the pretend option if you don’t see anything necessary in the list.
With other package management systems this can be a pain in the neck. For instance, on debian, I used to have to go through dselect and look at each package and use intuition to determine if anything installed was no longer necessary. And with gem, the package management system for rubygems, I wind up maintaining my own world-file-like file list in a file I call required_gems by hand, then to remove unneeded packages, deleting every single gem, and then reinstalling the ones I have recorded in my required_gems file.
So all hail the world file and happy 10th anniversary Gentoo!