[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What is the apt cache good for?



On Thu, Apr 24, 2008 at 05:34:59PM +0000, Hendrik Boom <hendrik@topoi.pooq.com> was heard to say:
> I can get some space back by doing apt-get autoclean.
> 
> I can get more back by apt-get clean.
> 
> This deletes lots and lots of files from my system.  Judging from du's 
> output, /var/cache/apt/ takes a bit more than a third of my disk space.
> 
> Now I've been keeping these files around, just in case.
> 
> But do I actually need any of these files?  Or are they only needed while 
> I'm actually busy installing stuff?  After those packages have been 
> installed, are the corresponding files in the cache good for anything at 
> all?  Perhaps for deleting the packages later?
> 
> (By the way, I use aptitude)

  Most of that space is stored in /var/cache/apt/archives.  The rest of
/var/cache/apt can be deleted but it'll be recreated next time you run
apt; it's a binary cache of data that's used to speed apt up.

  I think it's mostly a holdover from when Internet connections were
much slower than they are today.  apt keeps all the .debs it downloads
in /var/cache/apt/archives, so that if you decide to remove some
software and then want to re-install it later, you don't have to
download it a second time.  It's useful for some purposes (e.g., you can
copy those files to another machine rather than downloading them twice),
but it also tends to clog people's /var partitions.

  You can delete all the downloaded .deb files by running "aptitude clean".

  Daniel


Reply to: