The package management system on Linux makes installing and upgrading software a snap, but it also caches every package in a local folder in case it’s needed again. Here’s how to clear that cache and save loads of drive space.
Over at the How-To Geek site (my home away from Lifehacker), we’ve written up a guide to clearing the cache and also how to prevent your Debian-based Linux PC from caching the packages in the first place. Since many readers use Linux to resurrect an old PC with older hardware and smaller drives, it’s important to keep the drive clean. To clean out all the old packages, just enter the following command:
sudo apt-get clean
How much disk space did it clean up for you? The test machine we used had 441MB of cached packages, but this tip cleaned up more than 1GB on another PC. Hit the link for the rest of the walkthrough, including how to disable the caching of the packages in the first place.