Tech Tip: Removing Unnecessary Packages on Debian Systems
The command deborphan can be used to check for unnecessary (orphaned) packages. By default deborphan searches for orphaned libraries, but you can have it search for other types of packages also: data packages, dev packages, etc. by specifying one of its many --guess-* command line options.
If you don't have deborphan installed you can install it via:
$ sudo apt-get install deborphan
Now, to remove all orphaned (library) packages simply run:
$ sudo deborphan | xargs apt-get -y remove purge
To remove all orphaned data packages run:
$ sudo deborphan --guess-dev | xargs apt-get -y remove purge
To see all the orphaned packages on your system run:
$ deborphan --guess-all
The following excerpt comes from the deborphan man page and relates to the --guess-* options:
deborphan can try to guess what packages may not be of much use to you by examining the package's name. It will pretend the package is in the main/libs section, and report it as if it were a library. This method is in no way perfect or even reliable, so beware when using this!
So it's usually a good idea to view the output of deborphan and make sure that it appears reasonable before feeding it to apt-get -y remove purge.
- Readers' Choice Awards 2013
- Mars Needs Women
- RSS Feeds
- Sublime Text: One Editor to Rule Them All?
- December 2013 Issue of Linux Journal: Readers' Choice
- Raspberry Pi: the Perfect Home Server
- IBM Will Minimize Impact of Future Disasters
- Linux Systems Administrator
- Tech Tip: Really Simple HTTP Server with Python
- Senior Perl Developer
- So girls had it better ?
1 hour 36 min ago
- Reply to comment | Linux Journal
1 hour 56 min ago
- why is GNOME 3 in the fifth position at 14.1 %?
7 hours 28 min ago
- Sublime Is Brilliant!
12 hours 31 min ago
12 hours 50 min ago
- Rapid[Disk,Cache] better than native ram caching?
13 hours 15 min ago
- Nothing is perfect
13 hours 28 min ago
- Mixtapes Community
19 hours 7 min ago
- KDE is one true DE
19 hours 42 min ago
- Command Line Shells (Bash, Zsh, etc.) are 2nd place
20 hours 10 min ago