问题原文
原帖链接 · bumbleshoot · CC BY-SA 4.0
When I remove a package in Ubuntu using apt-get remove package, it always seems to leave behind a lot of files... for example, log files in /var/log, config files in /etc, data in /var/lib, etc.
How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?
已采纳解答
原帖链接 · Peter · CC BY-SA 4.0
You should purge those packages.
apt-get purge somepackage
from man apt-get (APT-GET(8))
purge
purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
