deborphan
Find orphaned Debian packages
TLDR
Display library packages (from the "libs" section of the package repository) which are not required by another package
List orphan packages from the "libs" section as well as orphan packages that have a name that looks like a library name
Find packages which are only recommended or suggested (but not required) by another package
SYNOPSIS
deborphan [options]
PARAMETERS
-a
List all orphaned packages, not just those from libs section.
-d
Specify an alternative dpkg database location.
-n
Do not query the dpkg database; use cached data (if available).
-p
Only list packages with the given priority (e.g., 'important', 'optional').
-s
Show the sizes of the orphaned packages (in kilobytes).
-u
Update cached dpkg data.
-h
Display help message.
-v
Display version information.
DESCRIPTION
deborphan is a tool that scans the Debian package database and identifies packages that have no other installed packages depending on them. These packages are considered 'orphaned' and might be candidates for removal, especially if they were initially installed as dependencies of other packages that have since been removed.
It is important to exercise caution when removing packages identified by deborphan. While orphaned packages might seem unnecessary, they could still be required by some applications or configurations not explicitly declared as package dependencies. It's crucial to understand the purpose of any package before removing it. Using deborphan to automatically remove packages without investigation is not recommended. Consider using `apt autoremove` instead for a more targeted dependency cleanup of packages flagged as automatically installed dependencies that are no longer required.
CAVEATS
deborphan only identifies packages that aren't explicitly listed as dependencies by other installed packages. It cannot detect dependencies created by configuration files or scripts.
Removing important packages could lead to system instability.
SECURITY CONSIDERATIONS
Be careful removing system libraries or packages with security implications. Verify before removing. Packages listed can be important even if they appear not needed.
USAGE EXAMPLES
To list orphaned packages in the library section:
deborphan
To list all orphaned packages (including those not in the libs section):
deborphan -a
HISTORY
deborphan was created to help manage dependencies on Debian systems, where removing packages can sometimes leave behind unused libraries or packages.
It became useful in cleaning up systems after updates and removing obsolete software. It has been maintained and updated over time to keep compatibility with evolving Debian packaging standards. Deborphan is part of the debianutils package.