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.
Using deborphan
Unusually well structured, the deborphan man page divides options into four sections. The topmost section lists options for the command, with the usual --help (-h) and --version (-v). The Options section also includes --stat-file=FILE (-f) for those who do not want to use /var/lib/dpkg/status for any reason.
[...]
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
-
KDE Unleashes Plasma 6.5
The Plasma 6.5 desktop environment is now available with new features, improvements, and the usual bug fixes.
-
Xubuntu Site Possibly Hacked
It appears that the Xubuntu site was hacked and briefly served up a malicious ZIP file from its download page.
-
LMDE 7 Now Available
Linux Mint Debian Edition, version 7, has been officially released and is based on upstream Debian.
-
Linux Kernel 6.16 Reaches EOL
Linux kernel 6.16 has reached its end of life, which means you'll need to upgrade to the next stable release, Linux kernel 6.17.
-
Amazon Ditches Android for a Linux-Based OS
Amazon has migrated from Android to the Linux-based Vega OS for its Fire TV.
-
Cairo Dock 3.6 Now Available for More Compositors
If you're a fan of third-party desktop docks, then the latest release of Cairo Dock with Wayland support is for you.
-
System76 Unleashes Pop!_OS 24.04 Beta
System76's first beta of Pop!_OS 24.04 is an impressive feat.
-
Linux Kernel 6.17 is Available
Linus Torvalds has announced that the latest kernel has been released with plenty of core improvements and even more hardware support.
-
Kali Linux 2025.3 Released with New Hacking Tools
If you're a Kali Linux fan, you'll be glad to know that the third release of this famous pen-testing distribution is now available with updates for key components.
-
Zorin OS 18 Beta Available for Testing
The latest release from the team behind Zorin OS is ready for public testing, and it includes plenty of improvements to make it more powerful, user-friendly, and productive.

