Clearing the apt-get cache

How do I delete uploaded apt-get package archives correctly? I looked in the folder

/var/cache/apt/archives

And I found there a list of packages *.deb, you can just delete them, but it is not clear whether this is correct.

Author: stanislav, 2010-12-23

2 answers

To clear the local package cache, use apt-get with the clean command:

sudo apt-get clean

For more information, see man apt-get.

 13
Author: h0rr0rr_drag0n, 2010-12-23 08:57:59

During the installation process via APT, the package files are cached in the /var/cache/apt/archives directory, and you can delete them.

 # apt-get autoclean # удаляет только неиспользованные файлы пакетов
 # apt-get clean     # удаляет все файлы из кэша
 1
Author: metallic, 2018-10-12 11:42:37