Debian – can i remove debian apt cache dir

cachedebian

i am trying to free up some space on my server, and i noticed that

/var/cache/apt has 322M

assuming that it is just a cache, in my mind it should be ok to delete those files and if it needs it again, then it will just download the files again

is that the correct assumption to make ?

serve: debian 4

Best Answer

Apt can do this with itself with the clean and autoclean options.

   clean
       clean clears out the local repository of retrieved package 
       files. It removes everything but the lock file from 
       /var/cache/apt/archives/ and /var/cache/apt/archives/partial/ ....

   autoclean
       Like clean, autoclean clears out the local repository of retrieved 
       package files. The difference is that it only removes package files 
       that can no longer be downloaded, and are largely useless....
Related Topic