The following command will list the packages with leftover configuration files.
dpkg -l | grep ^rc
Hence, send the output to apt purge to remove all such packages.
apt purge `dpkg -l | grep ^rc |awk '{print $2}'|xargs`
In the future, to avoid having the configuration files leftover after removing a package, use
apt purge <PACKAGE>
No comments:
Post a Comment