Fedora – Listing packages explicitly installed by the user using dnf

dnffedorapackage-management

I have a Fedora 28 system (EDIT: upgraded from Fedora 27, rather than installed fresh). I can run dnf list --installed to list the 2165 packages installed on my system. I can run dnf leaves (using the leaves plugin) to list all 368 packages which were installed in their own right, rather than as dependencies of something else.

The list of leaves includes both things like sudo-1.8.22-0.2.b1.fc28.x86_64, which is a pretty essential part of the system, and things like steam-1.0.0.54-17.fc28.i686, which is not, and is there because i installed it myself.

Does Fedora / RPM / dnf have the idea of "packages which are part of the base system" as opposed to "packages which a user asked for"? If so, is there any way to list all the latter packages? If not, is there some other way to produce that list, even approximately?

My ultimate goal is to clean up my system by removing old packages i installed but no longer need. The problem is that i have no idea what i've installed.

Best Answer

You could try

dnf history

which should give you more or less all package installing/removing/update actions you did via dnf. I don't really know how far this history gets back (in time).

Another place to get information about package modifications is to look into /var/log/yum.log. But the log is being rotated per default which will only give you a small time window to reconstruct the modifications.

Related Question