I have created an rpm package and while installing it I want to replace all the existing directory and its contents with rpm package data
Let's say that I have a directory called config/ which has some config files (a.config, b.config, etc.), now a.config is deprecated and I don't want it anymore. So I created a new rpm package with all the files except a.config, but when I install the package it updates b.config and every other file in the directory but it doesn't delete or remove a.config.
I am using following command to install rpm package
rpm -Uvh --force package.rpm
I want to keep only those files and directory that are included in the package and delete other files and folders
rpm -Uvh --force package.rpmto install rpm package - abhishek