LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-13-2008, 03:34 AM   #1
pbhat
Member
 
Registered: Apr 2004
Location: India
Distribution: Opensuse 11.3
Posts: 34

Rep: Reputation: 15
help me construct an rpm command


I installed some packages today in Opensuse which I want to remove.But I cannot delete them the same way as I installed as there I used 'patterns',but I do not want to uninstall whole pattern,keep some there.I can cleanly identify my choice by date.I do not know how to construct this in shell,but understand this is possible by
1.listing all installed packages ordered by date by 'rpm --query'
2.restricting the list by the specific date
3.feeding this to 'rpm -e'
I do not shell so well.Can somebody help me construct the command?

Below is sample sort-ordering by date.

pbhat@sidharth:~> rpm -qa --last|more
xmoto-0.4.2-0.pm.1 Friday 13 June 2008 08:07:33 AM IST
totem-2.20.0-6.pm.3 Friday 13 June 2008 08:02:31 AM IST
gnucash-2.2.0-33 Friday 13 June 2008 08:02:17 AM IST

I want to erase packages installed on '13 June 2008'.

Thanks in Advance.
 
Old 06-13-2008, 04:01 AM   #2
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
Code:
rpm -qa --last | grep "13 June 2008" | cut -f 1 -d " " | xargs rpm -e
 
Old 06-13-2008, 07:31 AM   #3
pbhat
Member
 
Registered: Apr 2004
Location: India
Distribution: Opensuse 11.3
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks Dudydoo.It workedd flawlessly.
 
Old 06-13-2008, 08:07 AM   #4
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
No problem. I'm sure there maybe other ways too, but that was the first one I thought of :-)
 
  


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 view content of RPM package using RPM command? Micro420 Linux - General 5 07-18-2010 03:03 PM
how to construct a compiler dayalan_cse Programming 10 08-31-2007 05:28 PM
Construct a Service amirsarb Programming 2 06-01-2007 09:58 AM
Why -bash: rpm: command not found??? Also an rpm/yum Q? vbtalent Debian 6 01-23-2006 04:55 PM
How can I get the rpm command and rpm build command on my Debian box? abefroman Debian 6 11-28-2005 12:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:49 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
Open Source Consulting | Domain Registration