Pinterest Stumbleupon Whatsapp

So you decided to dive into the not-so-scary world of Linux 5 Lies Linux-Haters Like To Tell 5 Lies Linux-Haters Like To Tell Linux may have been a scary operating system before, but all of that has changed in recent years. These myths, which are more accurately called lies, are now dead. Read More and, as it turns out, you’re actually having a blast. That’s usually how it goes, and many people find that Linux is much easier than they expected 7 Things That Are Easier To Do In Ubuntu Than In Windows 7 Things That Are Easier To Do In Ubuntu Than In Windows Read More .

But one problem that every newbie eventually faces — although not until they’ve used Linux for a while Considering Linux? 10 Common Questions Answered Considering Linux? 10 Common Questions Answered Here are the most common questions that Windows users have about Linux. After going through this list of questions and answers, you should feel much more confident with trying out Linux. Read More — is how to free up used space. After installing so many cool apps and packages, it’s easy to find your disk partition clogged to its limit Linux Disk Space: How to Visualize Your Usage Linux Disk Space: How to Visualize Your Usage Even with terabyte drives becoming the norm, it's amazing just how fast all of that space can fill up. What if you could see your entire disk space usage at a glance? Read More .


Fortunately, there are two easy commands that you can run that instantly clean up disk space. To begin, open up a terminal and type in the first one:

sudo apt-get autoremove

When you install new packages, sometimes they have prerequisite packages that must be installed beforehand. These are called dependencies. The thing is, when you uninstall packages, dependencies aren’t always removed and they end up taking up space for no reason.


The autoremove command deletes all dependencies that are no longer needed on your system.

sudo apt-get clean

When you install new packages, you actually download package files to your system (kind of like installer files on Windows), but even after packages are installed, they remain on your system (in case you need to install them again, you won’t have to re-download them). Obviously, this takes up a lot of space.

The clean command deletes all of these cached package files. There’s no risk in doing this. If you ever need to re-install a package, the package manager will just re-download it as necessary.

Note that these exact commands only work on systems using the apt-get package manager. Other package managers may have similar commands that do the same thing, but it’ll be up to you to find out what they are.

Got any other tips for quickly cleaning Linux disk space? Share with us in the comments below!

Image Credit: Linux on a Laptop by fatmawati achmad zaenuri via Shutterstock

Leave a Reply

Your email address will not be published. Required fields are marked *