≡ Menu

Ubuntu Linux: Clean aptitude Cache Command

How do I clean the aptitude command cache under Ubuntu or Debian Linux?

To aptitude command provides the following two options to clean its cache which is usually stored in /var/cache/apt/archives directory. Open the terminal and type the command:
$ apt-get aptitude clean
The above will remove all previously downloaded .deb files from the package cache. The following command Removes any cached packages which can no longer be downloaded. This allows you to prevent a cache from growing out of control over time without completely emptying it:
$ apt-get aptitude autoclean
You can also use GUI tool called Synaptic. It offers an option to delete and clean the cache. Start Synaptic and click on Settings > Preferences > Files > Clear cache.

Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:



{ 2 comments… add one }
  • Tricky October 28, 2012, 1:46 pm

    $ apt-get aptitude autoclean

    Should that be “$ apt-get|aptitude autoclean” perhaps?

  • crok January 19, 2017, 8:42 am

    sudo apt-get autoclean
    sudo apt-get clean
    sudo apt-get clean all

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: , , , , , , , , ,