Mar*_*ark 9 debian apt package-management
使用时apt,我可以告诉它使用其他/var/cache/apt位置吗?我尝试添加以下行/etc/apt/apt.conf:
% cat /etc/apt/apt.conf
Dir::Cache /home/apt
Run Code Online (Sandbox Code Playgroud)
并重新运行,apt但它仍然写入/var/cache/apt
nco*_*ers 14
您可以将以下行之一添加到/etc/apt/apt.conf.d/或 中的任何文件/etc/apt/apt.conf:
Dir::Cache{Archives /home/apt/}
Dir::Cache::Archives /home/apt;
Run Code Online (Sandbox Code Playgroud)
这会将所有部分/完整下载的.deb文件存储在/home/apt.
Dir{Cache /home/apt}
Dir::Cache /home/apt;
Run Code Online (Sandbox Code Playgroud)
这将存储pkgcache.bin, srcpkgcache.bininside/home/apt和所有部分/完整下载的.deb文件/home/apt/archives
请记住_apt为该目录的用户添加足够的权限,以便一切正常。
你可以看到aptwith的整个配置apt-config dump,例如:
> apt-config dump | grep Dir::Cache
Dir::Cache "/home/apt";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Run Code Online (Sandbox Code Playgroud)