您的位置:首页 > 运维架构 > Linux

Ubuntu linux卸载软件 apt-get remove,apt-get purge的区别

2016-10-11 00:00 411 查看
apt-get purge packagename 等同于 apt-get remove packagename --purge

apt-get remove 只删除软件包,不删除配置文件
apt-get purge 删除软件包并删除配置文件

配置文件只包括/etc目录中的软件服务使用的配置信息,不包括home目录中的

As the
man apt-get
page says:

remove - Packages installed are removed (Does NOT include configuration files)

purge - Purge is identical to remove except that packages are removed and purged. Purge meaning that any configuration files are deleted too.

This of course, does not apply to packages that hold configuration files inside the user's home folder (eg:
/home/SexyNoJutsuUser
), this files will not be touched ( Why does "Purge" not remove everything related to an app? )

So for example, if you were to remove Chrome, Firefox, XBMC or any other that holds some configuration files inside your
/home
folder, this files will stay there.

On the other hand if you were to install apache, squid, mysql or any other services similar that save their files in
/etc
, this configuration files will be deleted if you use
purge
.

参考资料:http://askubuntu.com/questions/231562/what-is-the-difference-between-apt-get-purge-and-apt-get-remove
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: