[Share Experiences] 一键清理卸载配置文件残留的方法
Tofloor
poster avatar
神末shenmo
deepin
Spark-App
Q&A Team
2022-03-11 07:00
Author

当你使用 apt remove卸载软件的时候,其实软件的配置文件会残留到系统里

图片.png

而使用apt purge卸载的软件就不会出现残留

而使用apt remove卸载过而有残留配置文件的该怎么清理呢?

教程如下


  1. 确认是否有残留

apt search "" | grep 配置文件残留

如果有输出,就是有残留

图片.png

  1. 执行

dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

自动清除残留的配置文件

来源: https://blog.csdn.net/huangbo_2020/article/details/84419158


博客原文: https://shenmo7192.gitee.io/post/apt%E5%8D%B8%E8%BD%BD%E6%AE%8B%E7%95%99%E7%9A%84%E6%B8%85%E7%90%86/

Reply Favorite View the author
All Replies
大多时候吃素
deepin
2022-03-11 07:52
#1

也可以加purge参数、apt remove --purge xxx

Reply View the author
少年中国之小宝
deepin
2022-03-11 10:01
#2

谢谢分享!

Reply View the author
neko
deepin
Ecological co-builder
Q&A Team
2022-03-11 17:57
#3
大多时候吃素

也可以加purge参数、apt remove --purge xxx

你甚至可以直接sudo apt purge 包名

Reply View the author
大多时候吃素
deepin
2022-03-12 04:20
#4
neko

你甚至可以直接sudo apt purge 包名

神末说了呀

卸载有残留时,用--purge删除配置文件

Reply View the author