OK, so I have Fedora running on my main machine (the default GNOME install), more on that later. First I need to understand some basic principles of Yum.
I have Firefox and everything is dandy. I wanted to watch a YouTube clip so I installed gnash-plugin
.
Then I wanted to remove it because it wasn’t performing particularly well, but I want to also remove dependencies it has pulled in, leaving my system in the same pristine state it was in before I installed it.
So how do you do this?
I installed the package gnash-plugin
with the command:
sudo yum install gnash-plugin
This pulled down three dependencies: agg
, boost
and gnash
itself.
What’s the correct way to remove gnash-plugin and all the dependencies?
If I run:
sudo yum remove gnash-plugin
Then it wants to only remove the gnash-plugin
package itself, leaving all the dependencies. Fair enough.
If I run:
sudo yum remove gnash
Then it only wants to remove the gnash-plugin
dependency and leaves the rest. Also probably fair enough.
If I run:
sudo yum remove --remove-leaves gnash-plugin
Then it wants to remove all the dependencies plus some others which were not brought in by gnash-plugin like Firefox.
I don’t want to remove Firefox!
Help?
-c
7 thoughts on “Fedora – removing unwanted deps?”
I assume you are trying to use the leaves plugin which doesn’t work very well currently as you have observed. Yum recently has got a feature that supports additional metadata. The plugin needs to be modified to use this yumdb and then it would work more accurately.
http://lists.baseurl.org/pipermail/yum-devel/2009-May/005629.html
Till then, package-cleanup –leaves and rpmorphan can come in handy.
Hey Rahul,
Thanks for the reply. Those two commands still don’t really do what I want.
Continuing my example above, if I remove gnash-plugin, neither of those two commands tell me to remove gnash or any of the other dependencies which were pulled in by the install.
It seems simple to me. If you install something which pulls in dependencies and then remove it, those dependencies should also disappear (unless some other package you have installed after it wants them to).
Am I missing something here?
-c
Easy —
sudo apt-get autoremove gnash-plugin
Oh, wait. 😉
Chris,
Yum didn’t store the details on whether a package is installed directly or via a dependency among other things until recently. The link I posted explains the implementation details. Like I said, the plugin has to be modified to use the yumdb to really do what you want. If you want more details, post to yum-devel list or go up to #yum channel in freenode. You aren’t going to get too many details as response to blog posts.
Jeremy,
Very funny but apt-rpm and smart is in the repo as well. So there 🙂
Hey Rahul,
I am running that version of Yum, so I’ll investigate further.
Thanks.
Jeremy, that would just be cheating now, wouldn’t it 😉
-c