Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Fedora and I'd like to have all the package names in a list, but only the ones I installed myself, not the default ones.

share|improve this question
Try looking at the yum.log file, it should have a history of installed packages. However, I believe that includes all the dependencies as well. I believe it's located at /var/log/yum.log. – Mr. Shickadance Jul 12 '11 at 15:19
Just FYI, I've added a feature request for DNF to cover this use case. DNF actually tracks this information, but to my knowledge does not have a UI for displaying it. bugzilla.redhat.com/show_bug.cgi?id=1278124 – mattdm Nov 4 '15 at 17:26
up vote 5 down vote accepted

That's hard, because as far as RPM is concerned there isn't much difference between packages which anaconda installed as part of the install and those you have installed since. Indeed if you customised the package selection during the install then just knowing what was installed afterwards doesn't help you know what customisations to apply.

You could use yum history to access the history and see when packages were installed, but that would include any updates to packages installed at install time.

Another technique would be to generate a list as soon as you install, like this:

rpm --queryformat="%{NAME}.%{ARCH}\n" -qa | sort > base.list

then later you can generate a new list:

rpm --queryformat="%{NAME}.%{ARCH}\n" -qa | sort > new.list

then use comm to find the differences:

comm -13 base.list new.list

but it's an awful lot of hassle and I'm not sure there is any great point if all you want to do is record what is installed for backup purposes.

If that's what you want then just generate a list using the above command and then you can later try and install those packages on a newly installed machine with:

yum install `cat package.list`

and it will just ignore anything that is already installed.

share|improve this answer
this works like a charm! – sergiofbsilva Sep 29 '12 at 2:36

The yumdb command has a search function, where you can filter by reason the package was installed.

yumdb search reason user


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.