PDA

View Full Version : [SOLVED] Cleaning up unused RPMs



sidd2
10th August 2012, 01:30 PM
Lately I have been installing apps, testing them than removing. I am aware that there is a long list of libs that were installed as dependencies and are probably unused in the today's configuration. Probably a good idea would have been to just write down what gets installed. Anyway, in the past years I have used only Synaptic with DEBs. There you can see remove orphaned packs. Now, how can I do that with Yum, Yumex or whatever?

secipolla
10th August 2012, 02:14 PM
If you have yum plugin remove-with-leaves it will remove those would-be-orphaned packages automatically.
If there are leftovers in your system you can check that with package-cleanup (from yum-utils).

PabloTwo
10th August 2012, 02:14 PM
yum can do that. Let's say you did "yum install xyz", and yum installed 3 more packages as dependencies for the xyz package.

sudo yum history list
will show you the last 20 transactions. Each transaction is given a number (first column). If your xyz install is in that list, you can do:

sudo yum history undo transaction_number
For transactions older than the last 20 shown, you'll need to specify that particular transaction by number, e.g.:

sudo yum history info 455
to identify the right transaction. You could:

sudo grep xyz /var/log/yum.log
to find the date you installed package xyz and it's dependencies, and use that date to home in on the yum history transaction.

See "man yum" and "yum history help"

Yellowman
10th August 2012, 02:19 PM
Try rpmorphan


su
yum install rpmorphan

marriedto51
12th August 2012, 08:55 PM
To list unused library packages, you can use

package-cleanup --leaves
(The package-cleanup command is part of the yum-utils package.)

DupermanDave
12th August 2012, 11:30 PM
I'm just curious, but why hasnt there been a feature yet that finds dates the packages were last used and then says ,"hey man. looks like you havent used GIMP in ages. Want to uninstall it and its dependencies?" Or maybe just a feature built into yum that lets you sort by install date? By yum i mean the graphical yum front ends like apper and whatever is on gnome.

sidd2
30th August 2012, 12:26 PM
Thank you guys

fiabledotbiz
6th December 2012, 01:58 AM
If you have yum plugin remove-with-leaves it will remove those would-be-orphaned packages automatically.

The exact name is "yum-plugin-remove-with-leaves".

secipolla
6th December 2012, 12:09 PM
rpmreaper seems to be very good to visualize and manage installed packages and dependencies (I only used it once).

fiabledotbiz
8th December 2012, 03:21 AM
Does rpmreaper consider all the packages it lists are useless?

secipolla
8th December 2012, 11:19 AM
Does rpmreaper consider all the packages it lists are useless?

If I understand your question, no. It lists everything so we can have an idea of why some package is installed etc.

As I said I used it once or twice in preparation for the upgrade from F17 to F18. It has this ncurses interface so it's moreless like a Debian's aptitude but looked easier to use.