Is it possible to clean the APT cache from the command line?

I ask because Ubuntu Tweak's Janitor is frozen due to the sheer number of packages in the cache that accumulated during the upgrade from 12.10 to 13.04.


Solution 1:

sudo apt-get clean will do what you want, though it does seem odd that it would freeze based on the amount of packages in the cache.

Solution 2:

While I could use the terminal to perform this, I'd prefer the GUI.

In Synaptic Install synaptic, go to SettingsPreferencesFile tab. Choose only delete packages that are no longer available and you're done.

You can also use Ubuntu Tweak, but it takes much longer to do the job.

An update - I've been using BleachBit for some time and the Superuser version lets delete the apt-cache and a lot more.