我不想清理/var/cache/apt/archives/
,我需要将我的 deb 文件保留在那里。哪个 apt 选项适合我?
答案1
您需要覆盖Keep-Downloaded-Packages
for apt
:
Binary::apt::APT::Keep-Downloaded-Packages "1";
apt.conf
或片段中/etc/apt.conf.d/
,例如
echo 'Binary::apt::APT::Keep-Downloaded-Packages "1";' | sudo tee /etc/apt/apt.conf.d/10apt-keep-downloads
(apt
并不是真正的“自动清理”,它不保留下载的软件包。)