LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   remove rpm but retain specific folder (https://www.linuxquestions.org/questions/linux-newbie-8/remove-rpm-but-retain-specific-folder-4175576823/)

apss_evaluator 04-06-2016 08:59 AM

remove rpm but retain specific folder
 
Hi Linux Guru's

just want to ask if is there a way to uninstall an rpm but retain a specific folder inside the directory?

Lets say I have an opscenter.rpm installed and the files are residing on /opt/opscenter. Inside /opt/opscenter there is a conf folder.

I would like to retain the /opt/opscenter/conf whenenver I want to try uninstalling the opscenter.rpm

Emerson 04-06-2016 09:11 AM

Isn't this the default behavior of most (all?) package managers? To remove only the files installed and leave all the files that were altered or not part of installation?

apss_evaluator 04-06-2016 09:20 AM

Quote:

Originally Posted by Emerson (Post 5527060)
Isn't this the default behavior of most (all?) package managers? To remove only the files installed and leave all the files that were altered or not part of installation?


yes like issuing "rpm -e <package_name>" removes /opt/opscenter directory. I would like to have /opt/opscenter/conf to be left intact after the uninstall command

Emerson 04-06-2016 09:31 AM

I do not use RPM based distro, have you checked the manual page for rpm?

grail 04-06-2016 10:33 AM

Is it as simple as copying the folder prior to issuing the uninstall command?

apss_evaluator 04-06-2016 10:39 AM

Quote:

Originally Posted by grail (Post 5527101)
Is it as simple as copying the folder prior to issuing the uninstall command?

yup that was my option before, I might be sticking on that now.

Thanks all


All times are GMT -5. The time now is 09:22 AM.