How to delete unused packages from Ubuntu, Linux Mint, and elementary OS

remove orphaned packages

It’s very easy for your PC to accumulate a lot of unused libraries over a period of time. BleachBit a very useful utility to cleanup trash, but it won’t be able to fish out installed libraries that got orphaned. In other words, there are several dependencies that get pulled by an application installation, but the same application when uninstalled, may not delete the installed dependencies. Therefore it’s now a junk in your PC.

remove orphaned packages

In this article, we will take a look at GtkOrphan, a free utility that can scan and find the orphaned libraries on your Ubuntu and derivatives, thus regaining your lost hard disk space.

Install GtkOrphan on Ubuntu, Linux Mint, and elementary OS

GtkOrphan is included in Debian and Ubuntu repositories. Hence you can simply install it by apt-get command.

Step 1: Launch ‘Terminal’.

Step 2: Run the following command:

sudo apt-get install gtkorphan

Enter root password to complete the installation. After installation is complete, you will can it from ‘Applications’. It gets listed as ‘Remove Orphaned Packages’.

GtkOrphan is for everyone, but…

GtkOrphan will scan and show the results in two tabs i.e. Orphaned packages and Non-orphaned packages. It’s the Orphaned packages tab that shows all the orphaned libraries that can be safely deleted.

GtkOrphan Utility running on Linux Mint
GtkOrphan Utility running on Linux Mint

Use caution when using additional ‘Options’

By default settings, GtkOrphan only lists the orphaned packages from the ‘libs’ section. But expanding ‘Options’ will give additional feature to remove orphaned packages from everywhere and this is where you have to exercise caution.

Shows all Orphaned Packages including Level 1
Shows all Orphaned Packages including Level 1

With this option turned ON, GtkOrphan will report all those installed packages that are not dependencies for any other. In other words, packages such as gparted, ubuntu-desktop, wine will be listed too, as they are top-level packages and no other package depends on them. Therefore, you must carefully go through this list and right-click ‘Hibernate package’ which will keep these packages from being removed and will not show in the scan list anymore. However, you can access and modify the hibernation list from the ‘View’ menu or from the right-click popup menu.

Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover, and enjoys hands-on with new promising distros. Currently, I'm using Linux Mint as a daily driver and run several other distros such as Fedora, Solus, Ubuntu, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. Hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more, and spread my love for Linux. If you find time, drop me an email or feedback from 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz