Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YUM reinstall original files from the package

Tags:

centos

yum

I'm trying to reinstall a package on CentOS: yum reinstall packagename however I can still see the changes that I made in the config files from this package.

Is there a way to force the re-load of the package and its config files?

like image 790
HTF Avatar asked Dec 10 '12 10:12

HTF


People also ask

What does yum reinstall?

You can use the yum command with reinstall option. This will reinstall the identically versioned package as is currently installed.

How do I download RPM with all dependencies?

The syntax of “yumdownloader” utility to download RPM along with its dependencies is: # yumdownloader [options] package1 [package2] [package..] For example, to download the RPM “firefox” and all its dependencies, use the beow command.


1 Answers

Check to see whether the reinstall of the package also created the config files with filenames ending with ".rpmnew". If such files exist, they will be the unmodified versions of the files.

If that is not the case, can you perform the package reinstallation in the two steps instead of one? That is, first do yum remove packagename and then do yum install packagename.

If neither of the above will do the trick, the simplest way to solve the problem is to rename or remove the config files and then do the yum reinstall.

like image 171
ZaSter Avatar answered Sep 27 '22 18:09

ZaSter