Ubuntu Linux: Clean aptitude Cache Command

Posted on in Categories last updated May 27, 2010

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.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

2 comment

Comments are closed.