Managing Debian packages with deborphan
Command Line – deborphan
© Lead Image © Ka Ho Leung, 123RF.com
The deborphan utility helps you keep track of packages and their dependencies on a Debian-based system.
Debian is distinguished by its utilities for package management. Every package manager has command options, but Debian also has at least 87 utility packages for everything from creating a package to managing installed packages. Some of these utilities, such as apt-cache, have been added to apt (the stripped down version of apt-get), while Nala uses fetch to find the fastest mirror like netselect-apt does. While many of the other available utilities remain hidden in the Debian repositories, they are worth seeking out. A prime example is deborphan [1], which identifies unneeded packages. This ability is useful for freeing up space on a system and, equally importantly, for knowing exactly what is installed, which is a prerequisite for security.
The deborphan utility takes its name from Debian's name for packages that are not dependent on any other packages. These orphans are the remnants of packages that have been deleted and left behind because Debian's package management commands do not remove dependencies, regardless of whether a package is removed or purged. Orphans can be formerly required packages, recommended packages that add enhancements most users would want, and suggested packages that add enhancements that some users may want. If you are constantly exploring and deleting packages, orphans can quickly multiply, especially because recommended and suggested packages can sometimes outnumber the required dependencies. Wrappers (i.e., packages such as apt that provide a common interface for related packages) are especially likely to have numerous dependencies. Left unchecked, orphans can waste memory and greatly increase potential security vulnerabilities. By default, deborphan detects orphans by searching /libs and /oldlibs to detect unused libraries (Figure 1), although its search can be expanded. It records the status of available packages in /var/lib/dpkg/status and packages to keep in no particular order in /var/lib/deborphan/keep.
[...]
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Linux Kernel Project Releases Project Continuity Document
What happens to Linux when there's no Linus? It's a question many of us have asked over the years, and it seems it's also on the minds of the Linux kernel project.
-
Mecha Systems Introduces Linux Handheld
Mecha Systems has revealed its Mecha Comet, a new handheld computer powered by – you guessed it – Linux.
-
MX Linux 25.1 Features Dual Init System ISO
The latest release of MX Linux caters to lovers of two different init systems and even offers instructions on how to transition.
-
Photoshop on Linux?
A developer has patched Wine so that it'll run specific versions of Photoshop that depend on Adobe Creative Cloud.
-
Linux Mint 22.3 Now Available with New Tools
Linux Mint 22.3 has been released with a pair of new tools for system admins and some pretty cool new features.
-
New Linux Malware Targets Cloud-Based Linux Installations
VoidLink, a new Linux malware, should be of real concern because of its stealth and customization.
-
Say Goodbye to Middle-Mouse Paste
Both Gnome and Firefox have proposed getting rid of a long-time favorite Linux feature.
-
Manjaro 26.0 Primary Desktop Environments Default to Wayland
If you want to stick with X.Org, you'll be limited to the desktop environments you can choose.
-
Mozilla Plans to AI-ify Firefox
With a new CEO in control, Mozilla is doubling down on a strategy of trust, all the while leaning into AI.
-
Gnome Says No to AI-Generated Extensions
If you're a developer wanting to create a new Gnome extension, you'd best set aside that AI code generator, because the extension team will have none of that.

