当前位置: 首页>>技术教程>>正文


使用APT安装/升级的软件包存储在哪里?

,

问题描述

随着时间的流逝,我们倾向于安装apt-get并添加或替换软件。

这些是以某种形式存档的,还是在安装后得到auto-cleared?如果没有得到auto-cleared,这意味着需要清理,不是吗?

最后,如果它们不是auto-removed,我们可以在不同的机器上重用这些软件包吗?

最佳思路

下载的程序包存储在/var/cache/apt/archives

如果要删除它们,请使用sudo apt-get clean

man apt-get

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/. When APT is used as a dselect(1) method, clean is run automatically. Those who do not use dselect will likely want to run apt-get clean from time to time to free up disk space.

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. This allows a cache to be maintained over a long period without it growing out of control. The configuration option APT::Clean-Installed will prevent installed packages from being erased if it is set to off.

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/8141.html,未经允许,请勿转载。