apt-get clean (clean apt cache for smaller docker image)

apt-get clean


apt-get autoremove


rm -rf /var/lib/apt/lists/*

=========================================

 https://linuxhint.com/why_apt_get_clean/

https://serverfault.com/questions/449726/what-is-the-purpose-of-the-files-in-this-directory-var-lib-apt-lists

/var/lib/apt/lists/

Storage area for state information for each package resource
specified in sources.list(5) Configuration Item: Dir::State::Lists.

/var/lib/apt/lists/partial/
Storage area for state information in transit. Configuration Item:
Dir::State::Lists (partial will be implicitly appended)


du –sh /var/cache/apt/archives
^ this command check apt cache file size

use no install recommends
apt-get install --no-install-recommends something

留言

此網誌的熱門文章

Making a Windows 11 hotspot without an internet connection