Get to Know Debian Goodies
If you work with Debian-based systems, you probably know the basics of working with
dpkg and APT's tools. But there's much more available. To find out which packages have release-critical bugs, hog the most disk space or still use older versions of files that have been upgraded, you want Debian Goodies.
debian-goodies package is a set of utilities that work with Debian packages and provide more information than you can (easily) get out of
dpkg or the standard (Advanced Package Tool) APT utilities. Let's take a look at some of the most useful utilities, starting with my favorite --
When you install a new package, some running applications may continue using older versions of files (like libraries or configuration files) that have been upgraded. You can find out, quickly, which processes are using the older files with
checkrestart. It will return the number of processes still using files that have been upgraded, and the process number. You can also see the file in use by adding the
-v (verbose) option. If the process has an init script that can be used to restart it, then
checkrestart will also provide that.
Why do you want to do this? One major reason is that a system upgrade may provide a security update. This may not be used by running processes because they're still using the older version of a library.
Looking to slim down a system? The
dpigs package tells you which installed packages consume the most space. Unfortunately, it doesn't tell you how much space is consumed. However, it does give you an idea of which packages are hogging the most space. By default, it will report the top 10 packages, but you can see more with the
-n X option, where X is the number you want to see. For example, to see the 25 top space-hogging packages, use
dpigs -n 25.
Wondering which packages have serious bugs filed against them? Use the
popbugs utility. This works off of Popularity Contest data, so you'll need to have the
popularity-contest package installed first. Once you have that data, you'll be able to see which packages have release-critical bugs, which have patches and whether they're targeted at the current stable release or the next release. It also displays the bug numbers, whether the bugs are tagged as security related, if the bugs need more information, and so on.
If an update has broken something on the system, you might use the
which-pkg-broke utility. No, it doesn't have magical diagnostic powers -- it simply looks at the package you specify and tells you when its dependencies have been updated. So if you look at, say
coreutils, it will give you a list of dependencies and when they were updated. Just run
Looking for more information on a package? The
dhomepage utility will take you to a package's homepage (if it has one). Simple, but useful.
Finally, the Debian Goodies package comes with several grep utilities for Debian packages. As you might imagine, it's very handy to be able to grep just the contents of packages installed on the system.
If you spend a lot of time working with Debian-based systems, the
debian-goodies package is a must-have. You might not use it every day, but it's an extremely valuable set of utilities to have handy.
Joe 'Zonker' Brockmeier is a freelance writer and editor with more than 10 years covering IT. Formerly the openSUSE Community Manager for Novell, Brockmeier has written for Linux Magazine, Sys Admin, Linux Pro Magazine, IBM developerWorks, Linux.com, CIO.com, Linux Weekly News, ZDNet, and many other publications. You can reach Zonker at email@example.com and follow him on Twitter.