apt remove vs purge

我看到sudo apt remove package_namesudo apt purge package_name
但有什么区别? 是一个比另一个更安全还是删除该软件包安装的软件包?


 man apt 


  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. 

所以简而言之: remove一些配置文件后面的purge没有。 如果以后要删除这些配置文件,您甚至可以使用清除。

apt-get的联机帮助(运行man apt-get看到这个)说:

 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). 

简而言之, remove会保留配置文件,而purge会删除它们。 两者都是安全的,但要选择哪一个取决于您是否要删除配置。