LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   help me construct an rpm command (https://www.linuxquestions.org/questions/linux-software-2/help-me-construct-an-rpm-command-649002/)

pbhat 06-13-2008 03:34 AM

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.

Dudydoo 06-13-2008 04:01 AM

Code:

rpm -qa --last | grep "13 June 2008" | cut -f 1 -d " " | xargs rpm -e

pbhat 06-13-2008 07:31 AM

Thanks Dudydoo.It workedd flawlessly.

Dudydoo 06-13-2008 08:07 AM

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


All times are GMT -5. The time now is 06:56 PM.