Bug 1278124 - RFE: Add new option to repoquery - user-installed
RFE: Add new option to repoquery - user-installed
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaroslav Rohel
Fedora Extras Quality Assurance
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-04 12:25 EST by Matthew Miller
Modified: 2017-05-14 16:19 EDT (History)
8 users (show)

See Also:
Fixed In Version: dnf-2.4.1-1.fc26
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-14 16:19:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Miller 2015-11-04 12:25:15 EST
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.
Comment 1 Andrew Toskin 2015-11-08 20:37:02 EST
@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.
Comment 2 Jaroslav Mracek 2015-11-09 07:48:47 EST
The new option "user-installed" will be better for dnf repoquery due to better capability to formating output and so on.
Comment 3 Fedora Admin XMLRPC Client 2016-07-08 05:25:01 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 4 Andrew Toskin 2016-07-22 19:31:22 EDT
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.
Comment 5 Jaroslav Rohel 2017-04-25 16:34:59 EDT
PR with new option https://github.com/rpm-software-management/dnf/pull/797
Comment 6 Fedora Update System 2017-05-11 04:59:00 EDT
dnf-2.4.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e0fa49ff81
Comment 7 Fedora Update System 2017-05-12 21:10:41 EDT
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
Comment 8 Fedora Update System 2017-05-14 16:19:35 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.