2

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.

  • The generated kickstart file will contain the initial package configuration (although it may not spell out each individual package). – Ignacio Vazquez-Abrams May 20 '18 at 21:53
  • @IgnacioVazquez-Abrams Do you mean /root/anaconda-ks.cfg? If so, that doesn't seem to say anything about packages - here it is. Also, the timestamp on the file is from when i first installed Fedora 27, rather than when i upgraded to Fedora 28 (which i didn't mention, sorry!). – Tom Anderson May 21 '18 at 21:22
  • I have an Ansible playbook which (re)builds my own personal workstation. – Michael Hampton May 22 '18 at 0:47
1

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.

  • You're on to something here! For me, dnf history goes all the way back to when i first installed the machine. – Tom Anderson May 21 '18 at 21:48
  • Great, when did you install first? – xx4h May 21 '18 at 21:50
1

dnf history userinstalled looks promising. It lists only 142 packages, some of which i recognise, but some of which are kernels and common system packages.

However, if i look at the intersection of the 'userinstalled' packages and the leaves:

comm -12 <(dnf leaves | sort) <(sudo dnf history userinstalled | sort)

There are ~50 packages, most of which look at least somewhat familiar:

  • trying to get hardware to work right: acpi broadcom-wl dkms kmod-wl lshw vulkan
  • programming: gcc-gdb-plugin java-1.8.0-openjdk java-1.8.0-openjdk-devel libomp
  • favourite tools: apg ffmpeg lastpass-cli mercurial mosh youtube-dl zsh
  • PDF malarkey: ghostscript-tools-fonts ghostscript-tools-printing texlive-epstopdf-bin
  • desktop utilities: clementine feh steam transmission-cli vlc
  • Android stuff: android-tools jmtpfs libmtp-examples simple-mtpfs
  • RPMFusion: rpmfusion-free-release rpmfusion-nonfree-release
  • solving this problem: dnf-utils python3-dnf-plugin-leaves

And then a bunch of stuff i can't really account for: compat-ffmpeg28 dracut-live fedora-obsolete-packages langpacks-en libnsl2 memtest86+ openssl-pkcs11 python2-beautifulsoup4 python3-beautifulsoup4 python3-dnf-plugin-system-upgrade python2-pypam python3-cssselect python3-html5lib webkit2gtk3-plugin-process-gtk2

I can't be sure that this is everything i've installed myself, but it's a substantial fraction of it, at least.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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