When I do yum remove
, it sometimes keeps a package's configuration files.
Is there anyway to remove a package completely, without keeping any file that belonged to the package?
I am running CentOS.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityCheck the Deleting packages with yum
section in the HOW TO
There says:
In any event, the command syntax for package removal is:
# yum remove package1 [package2 package3...]
As noted above, it removes package1 and all packages in the dependency tree that depend on package1, possibly irreversibly as far as configuration data is concerned.
As a quick way you can try:
yum remove package
yum install package
Also here is an interesting for
. And the question can help you.
The one that keeps configs in a backup is rpm -e
What you can do is find out what is in a rpm using:
rpm -ql packagename
or
rpm -qlp packagename if the package is not yet installed.
then, you can manually make the modifications you want.
Hope this helps!
/etc/sysconfig/<package>
file is still there.
Feb 26, 2018 at 21:42
rpm -e xxx.rpm && rpm -ivh --replacefiles xxx.rpm
This in effect replaces the old configs kept after "erasing" Must be a way to do this with yum and dnf
rpm -qf ~/.mozilla
and it will report that that file is not part of any package.yum remove
does not remove those files.