LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2016, 08:59 AM   #1
apss_evaluator
Member
 
Registered: Mar 2012
Posts: 115

Rep: Reputation: Disabled
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
 
Old 04-06-2016, 09:11 AM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,083

Rep: Reputation: Disabled
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?
 
Old 04-06-2016, 09:20 AM   #3
apss_evaluator
Member
 
Registered: Mar 2012
Posts: 115

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
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
 
Old 04-06-2016, 09:31 AM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,083

Rep: Reputation: Disabled
I do not use RPM based distro, have you checked the manual page for rpm?
 
Old 04-06-2016, 10:33 AM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,529

Rep: Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896
Is it as simple as copying the folder prior to issuing the uninstall command?
 
Old 04-06-2016, 10:39 AM   #6
apss_evaluator
Member
 
Registered: Mar 2012
Posts: 115

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by grail View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give read-only permission for specific user for specific folder in RedHat digitalbiopharm Linux - Newbie 15 12-28-2013 03:12 PM
[SOLVED] Retain first occurence of a pattern, remove all others hector00 Programming 11 05-31-2013 02:07 PM
Way to make autofs mount to specific USB flash drive to specific folder? utahnix Linux - Software 2 11-24-2010 05:27 PM
[SOLVED] Bash command to remove all files within a specific folder shayno90 Linux - Newbie 21 10-21-2010 11:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration