重新安装/清除 apt 包而无需重新下载

重新安装/清除 apt 包而无需重新下载

简单地说,要清除并重新安装像 Libreoffice 这样的东西,我找不到不再次下载所有软件包就能做到这一点的方法。

关于如何做到这一点,我是否遗漏了一些明显的信息?

谢谢!

答案1

似乎通过删除一个包,除了修改过的配置(如果使用清除的话也会被删除)之外,所有的东西都会从系统中删除。man apt:

install, remove, purge (apt-get(8))
           Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match. The requested action can be overridden for specific packages by append a plus (+) to the package name to install this
           package or a minus (-) to remove it.

           A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select. Alternatively the version from a specific release can be selected
           by following the package name with a forward slash (/) and codename (stretch, buster, sid ...) or suite name (stable, testing, unstable). This will also select versions from this release for dependencies of this package
           if needed to satisfy the request.

           Removing a package removes all packaged data, but leaves usually small (modified) user configuration files behind, in case the remove was an accident. Just issuing an installation request for the accidentally removed
           package will restore its function as before in that case. On the other hand you can get rid of these leftovers by calling purge even on already removed packages. Note that this does not affect any data or configuration
           stored in your home directory.

我不确定这是否可行。

相关内容