I frequently hear requests to produce a list of all user-installed packages (as opposed to those installed by default or brought in by dependencies.) For example, this question on Unix & Linux Stack Exchange: http://unix.stackexchange.com/q/16527/2511 DNF actually tracks this information, and the list can be manipulated with the "dnf mark" command (either "install" or "remove"). However, as far as I can see, there's no way for a user to get a list. It would be nice to have dnf list marked to do this. (Or possibly "dnf list userinstalled", as "marked" isn't completely obvious... but on the other hand, at least "marked" is consistent.) Or, alternately, this could be dnf list mark I don't strongly care, but the functionality would be great. :) As a bonus, it would be nice to be able to easily format the output as a list of just package names, with no versions. This then can be the input for kickstart files, playbooks, or whatever, to make recreating the system after a fresh install easier.
@Matthew Miller I was actually trying to figure out a way to do this when I followed you from the Stack Exchange thread to here, and I read your comment about how DNF actually tracks user-installed applications already. So I took a closer look at the dnf manpage, and I think I got it... Perhaps you were looking at the `list` subcommand? That's what I would have expected. Try `dnf history userinstalled` instead. It lists some extra things that I think were actually installed by anaconda, such as gnome-shell, but it's pretty much just what we were looking for. Perhaps `dnf list` could have an alias added for `dnf history userinstalled`? For some reason, `dnf history` requires sudo access, which seems weird, since `dnf list installed` doesn't require such privileges. Running `dnf history` when backing up data and config files, and then running `dnf install` on the "userinstalled" list doesn't seem too complicated. But for less technical users, some might appreciate it if generating and using this list of applications were integrated into GNOME Software, or some other gui app.
The new option "user-installed" will be better for dnf repoquery due to better capability to formating output and so on.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
If this issue is still being considered, the feature already exists as `dnf history userinstalled`. The only problem is that the output also includes a few things, such as anaconda, which I did not actually install myself, except as part of the process of installing Fedora itself. If we were to change the command line, I think it would make more sense as a --user option to `dnf list installed`, or as the original post suggested, `dnf list marked`. Something along those lines.
PR with new option https://github.com/rpm-software-management/dnf/pull/797
dnf-2.4.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e0fa49ff81
dnf-2.4.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e0fa49ff81
dnf-2.4.1-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.