4

I use Ubuntu 14.04 and I have a lot of files in /var/cache/apt (please note that they are NOT archives). I already ran aptitude autoclean but I think that this acts only on archives.

Can I simply remove the files like pkgcache.bin.02SUCA? I guess that pkgcache.bin and srcpkgcache.bin are important aren't they?

drwxr-xr-x  4 root root    20480 Dez  2 21:31 ./
drwxr-xr-x 22 root root     4096 Nov 22 22:40 ../
drwxr-xr-x  2 root root     4096 Jun 21 16:02 apt-file/
drwxr-xr-x  3 root root    53248 Dez  2 21:23 archives/
-rw-r--r--  1 root root 16368834 Dez  2 21:31 pkgcache.bin
-rw-r--r--  1 root root 25165824 Dez  2 20:26 pkgcache.bin.02SUCA
-rw-r--r--  1 root root 25165824 Dez  2 20:19 pkgcache.bin.03XpfC
-rw-r--r--  1 root root 25165824 Dez  2 20:19 pkgcache.bin.077hIh
-rw-r--r--  1 root root 25165824 Dez  2 20:19 pkgcache.bin.0bLboZ
-rw-r--r--  1 root root 25165824 Dez  2 20:19 pkgcache.bin.0EoDpq
-rw-r--r--  1 root root 25165824 Dez  2 20:32 pkgcache.bin.0mROye
... (goes on forever)

1 Answer 1

5

From Ubuntu Wiki

Apt stores two caches in /var/cache/apt/: srcpkgcache.bin is rather useless these days, and pkgcache.bin is only needed for faster lookups with apt-cache (software-center has its own cache). Removing those two buys 26 MB, for the price of apt-cache taking an extra two seconds for each lookup.

Hence, safe to remove

2
  • Thanks, it works. I did after: rm -rf /var/lib/apt/lists/* aptitude update
    – musbach
    Dec 2, 2015 at 21:27
  • ... and won't they be regenerated?
    – einpoklum
    Jan 2, 2018 at 22:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .