Why is dificult to track packages installed by user with dnf in comparison to silverblue rpm-ostree?

in silverblue you can list installed layered packages with: ‘rpm-ostree status’

but with dnf you have either:
‘dnf history’
‘dnf repoquery --userinstalled’

but they are messy, listing also dependencies, you ending up lost on track which you really installed.

Is there a solution for this ?

You can restrict the output of the above command even further, by filtering out some of the installation reasons such as External User and Group, and leaving only the User option.

dnf rq --userinstalled --leaves --queryformat=%{full_nevra}' - '%{reason}$'\n' | grep ' - User'

(For some reason, with the --queryformat flag the output is not displayed on separate lines, so I had to tweak the command).

1 Like