Cam*_*den 13 package-management apt purge
我看到sudo apt remove package_name和sudo apt purge package_name,
但有什么区别?一个比另一个更安全还是删除该软件包安装的软件包?
urb*_*ben 21
您可以阅读 apt 的手册
man apt
Run Code Online (Sandbox Code Playgroud)
在第 35 行,您会发现以下内容
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.
Run Code Online (Sandbox Code Playgroud)
简而言之:
remove在purge没有的地方留下一些配置文件。如果以后要删除这些配置文件,您甚至可以使用清除。
apt-get(run man apt-getto see this)的联机帮助页说:
remove
remove is identical to install except that packages are removed instead of installed. Note that removing a
package leaves its configuration files on the system. If a plus sign is appended to the package name (with
no intervening space), the identified package will be installed instead of removed.
purge
purge is identical to remove except that packages are removed and purged (any configuration files are
deleted too).
Run Code Online (Sandbox Code Playgroud)
简而言之,remove在purge删除它们的同时保留配置文件。两者都是安全的,但选择哪一个取决于您是否要删除配置。
| 归档时间: |
|
| 查看次数: |
13579 次 |
| 最近记录: |