LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-05-2009, 12:55 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
Linux RPM ?


I have been looking for method through which I can delete some files whenever i run rpm -e <packagename>? Is there any way to do this.
Whenever I run
Code:
rpm -e <packagename>
it should also delete some files which may or maynot be linked or being used?
 
Old 08-05-2009, 05:06 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You mean files that are completely unrelated to the RPM you're removing?
What an odd request ... =D


Cheers,
Tink
 
Old 08-05-2009, 05:55 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
If they were always the same files (did not depend on the package you were removing), I guess you could just alias the command, or create a one-liner script to one of the bin directories that ran an rm command in addition to rpm. But if the files at hand depend on the package in question, it's a little harder.
 
Old 08-05-2009, 06:18 AM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Can %postun do the job?
 
Old 08-05-2009, 06:32 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Quote:
Originally Posted by Tinkster View Post
You mean files that are completely unrelated to the RPM you're removing?
What an odd request ... =D
Not only odd but if the files have no relation to the RPM then it has the potential of undermining what RPM stands for.

I suggest the OP be more verbose and post actual package and filenames.
 
  


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
rpm -ihv hp_qla2x00src-8.01.07.25-1.linux.rpm during Qlogic driver installation Dennisliu Linux - Software 5 09-10-2008 06:08 PM
newbie in linux-mandrake; installing .rpm vmware for linux jet_espinal Mandriva 2 11-02-2006 07:06 AM
counter part of "rpm -ivh --force kernel....rpm in slackware b0nd Slackware 2 01-28-2006 08:46 PM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 10:22 PM
.src.rpm, .i386.rpm and .i686.rpm hhegab Linux - Software 2 06-19-2003 08:19 AM


All times are GMT -5. The time now is 06:37 AM.

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