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 FOSSLinux.com. 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!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

24,262FansLike
192FollowersFollow

LATEST ARTICLES

How to create Manjaro Linux Live USB drive in Windows PC

Create Manjaro Live USB flash drive
Manjaro Linux is based on the independently developed Arch operating system.  Arch Linux is already known to be an exceptionally fast, powerful, and lightweight distribution. But Arch Linux is typically targeted to geeks who have some Linux background and command-line usage.
manjaro screenshots
Want to take a quick virtual tour Manjaro XFCE edition instead of downloading GBs worth of ISO image and then making a Live USB of it? We will make it easy for you. Here are a series of screenshots of the important aspects of Manjaro Linux in XFCE edition. This is a light-weight edition, and aims to be fast and low on system resources. You will be amazed on how it is still visually appealing and user friendly.
Ubuntu 19.10 beta overview
It may be early, but I've been looking forward to the release of Ubuntu 19.10 for some time now. As an impatient person, and promised readers in the FOSSLinux article announcing the release of Eoan Ermine that we would provide you a review of Ubuntu 19.10 Eoan Ermine - Beta.  So, here it goes.
terminate frozen app
For dealing with a frozen app or desktop, you can't use the CTRL+ALT+DEL in Linux system. Instead, there are powerful alternatives that come in handy in frustrating situations. We pick the best methods available for you.