The question is a duplicate from Stackoverflow siteI upgrade rpm package with rpm -Uvh command.Original and new configuration file is the same, but current file on disk has been changed.This situation described in Original file = X, Current file = Y, New file = XDue to delivered fixes in a new rpm file I want to overwrite this configuration file anyway. Is there way to do it?The configuration file appear in %config section of rpm spec.--replacefiles, --replacepkgs options don't help here.
rpm -Uvh - How to replace modified config file
linux;rpm
You can remove config file prior to upgrade, and then upgrade. List of config files you can get byrpm -qplc package.rpmand then - remove/rename all, and upgrade - it'll create a new one config files.correct way is a bit other - in spec file don't tag config file which should be replaced as %config(noreplace) - but it must be done when package is build.