Ask Your Question

Diff of fedora installation on package level?

asked 2014-03-18 00:09:18 -0600

amerts gravatar image

I guess this question has two parts.

1) Is there a convenient way to search for files that are not owned by any package excluding /home, any folders inside /var deeper than 2 levels, etc? Kind of like a way of consolidating all modifications to a system outside of what yum and rpm -Va would tell you.

2) Is there an easy way to get a list of what packages would need to be installed and removed to get the system back to just the default package groups that anaconda would install? Does hawkey maybe have a way of saying "Install group xyz and remove everything that isn't a dependency of group xyz"?

The theory being that 1) would help with cleaning up after crappy binary only installers with a fair expectation of being able to make sure they didn't leave anything behind and that 2) could be used as a much better alternative to e.g. rpmreaper and have it hide default Fedora package leaves and filter down to just the package leaves that aren't present in a default install in addition to being able to easily find cyclic dependencies that rpmreaper is just helpless on.

edit retag flag offensive close merge delete



The problem with 1) is that there are many files which do not belong to any RPM, even on a clean system, e.g.: for f in $(find /usr/bin -name "*"); do rpm -qf $f | grep owned; done . As for 2) - i'm not sure what a default would be: @Core? See . The solution to 1) is - never install as root software which is not in Fedora repos. With some effort most software can be installed from unprivileged accounts.

marcindulak gravatar imagemarcindulak ( 2014-03-18 10:40:39 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-18 05:55:43 -0600

mrunge gravatar image

updated 2014-06-02 15:06:00 -0600

what you could do is: walk through the files in question, and do a rpm -qf to get the matching package. If that is empty, you'll have an additional file, or a file not owned by any package.

This seems to be a very generic use case, so there must be a script or so. Sadly, I don't know any...

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-03-18 00:09:18 -0600

Seen: 261 times

Last updated: Jun 02 '14