Jump to content

find unneeded dependencies


PMo6022
 Share

Recommended Posts

Is there any quick method to find packages I installed as dependencies that are no longer needed? For instance, if I install a program and it has 3 dependencies, and then I uninstall the program, the dependencies are left behind.

 

I know you can do: $ rpm --query --requires <package_name>

 

to list all dependencies, and then try to remove any that seem unneeded, since RPM won't let you remove a package that another package requires, but that is cumbersome. What I am looking for is a quick way to scan all installed packages and remove unneeded ones.

Link to comment
Share on other sites

There's a tool called "urpmi_find_leaves" or something like that. It will find RPM packages that are not needed by any other RPM package.

 

Then rpm -e those you don't need. Start again until there's nothing left to uninstall.

 

Yves.

Link to comment
Share on other sites

yep - it's a good idea to exercise caution when doing this. remember these tools can only understand the rpm database, so if you installed something because you needed it for something you installed *not as an rpm* - say something you built from source or installed from a non-rpm installer - then remember not to uninstall it just because no rpm package requires it :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...