packages

Removing package cruft from a Debian or Ubuntu system

Over time, especially with Ubuntu and it’s 6 month release cycle, a system can contain a number of packages that are no longer needed but still present on the system in some way. I have a number of techniques I use to locate these packages and remove them and I thought I would share them.

Answering package dependency questions using apt-cache and apt-rdepends

I often find myself asking the same questions about package dependencies. It can sometimes be confusing to remember which command answers which question due to the similarity of the commands. These are the common questions:

Determining which installed packages are from universe or multiverse

I was interested in trying to determine how many packages were installed from universe on the servers I manage. Luckily I came across a helpful discussion titled list installed Universe packages which suggested this command:

  • comm -12 <(apt-cache dumpavail | grep-dctrl -nsPackage -FSection universe/ |sort) <(dpkg --get-selections | awk '$2 == "install" { print $1 }' |sort)

To get the command to work I had to install the package dctrl-tools (for the grep-dctrl command):

  • sudo apt-get install dctrl-tools

After that it worked pretty well and can easily be adapted to search for other sections. It turns out that my servers use many packages from universe but none from restricted or multiverse, which is nice.

New packages in Ubuntu 8.10 (Hardy Heron) that I'm excited about

Sure there are a lot of updates and other niceness but today I got excited about some new packages that haven’t been present in past releases. I’ve included them with others that I’ve mentioned in the past. So here are packages that are new in Ubuntu 8.10 but that I plan to use immediately.

Syndicate content
Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons by-nc-sa 3.0 License