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

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.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, 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 Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!


Please enter your comment!
Please enter your name here




How to create a Fedora Games Live USB drive in Linux

One of the best Fedora spins that has been for a while and also being well maintained is the Fedora Games. The Fedora Games spin is a great showcase of the best games available in the Fedora operating system.
essential linux commands
Last week, we shared with you several "cool and fun" commands to get comfortable and confident with the Linux command-line. In our quest to further aid Linux users with mastery of the command line, or CLI, we present you with a variety of command-line utilities essential for all Linux users, regardless of proficiency level.
clipboard manager linux
We have all had that moment when we copied a text, but we first needed another one, and in the process, lost the first one. If you're lucky, you can get it back quickly with a bit of work.
Test drive linux online
Enter, a website that allows Linux users to test various distros online, without downloading the ISO or installing the distro. With, you can check a distro with no muss, no fuss.