HELP! I destroyed /var/cache/apt

sktsee sktsee at
Sat Jan 30 17:11:12 UTC 2010

On Sat, 30 Jan 2010 10:35:39 -0600, Jay Ridgley wrote:

> Folks,
> Well to put it simply "I shot myself in the foot"!
> How do I recover a completely destroyed /var/cache/apt directory? I
> messed up with an sudo rm -rf to get rid of some files in /var...
> How do I rebuild the information on installed packages?? Can I copy one
> from another system?

Fortunately the package database isn't stored in /var/cache/apt. Just re-
run "sudo apt-get update" to recreate the .bin files, though you may need 
to do a "sudo mkdir /var/cache/apt" first if apt-get doesn't create it 
automatically. Of course, any cached packages will be gone, but that's 
not a bad thing as its good to clean the cache out if you are short on 
disk space.


More information about the ubuntu-users mailing list