dnf repoquery --userinstalled shows a giant list of packages, I think it might be due to to gnome-software.
Is there a convenient way to unmark everything?
Probably dnf mark remove *.
But wait, don’t you need a set of installed packages to have an OS…
Though I still want to compare my list with that of Fedora 38 default.
I’m trying to find the extra packages introduced during my F37 to F38 upgrade that won’t go away.
(Related: Who created unbound folders)
These are packages that won’t be autoremoved when removing packages. So in general, it is better to leave them as “userinstalled”. This status was initially inherited from the liveUSB system, and ultimately from the initial build of that system.
The live system is built by using rpm to install a bunch of packages and groups, and some additional packages will be installed as dependencies. The latter set of packages are marked as “not userinstalled”.
Running dnf history info 1 will show the build of the initial live system, and what was installed.
Before I go and write a live USB, anyone has a dnf repoquery --userinstalled output from a fresh Fedora 38 install (never used PackageKit/GNOME-Software)?
Just found out from my newish AArch64 Workstation install that the list is really short, compared to my AMD64 install upgraded from F37 using GNOME-Software. Going to see if it’s the case on AMD64 F38 live ISO.
p.s. The problem might not be caused by GNOME-Software. When I did dnf system-upgrade on F29 to F31, a bunch of packages were marked as user installed after the upgrade. Though the version is old, might not happen nowadays.
The user installed mark is there to protect packages from being inadvertently auto-removed when removing some package at a later time. If you run dnf autoremove it would basically remove almost everything not marked as user installed.
Because they were not present when compared to a fresh install and were never installed by me, but marked as user installed by some software, which is the topic of this post…
Autoremove will not really remove everything. As far as I can tell, what a distribution installs by default is defined in groups. So they have group mark instead of user mark.
$ dnf group list --installed
Last metadata expiration check: 2:21:20 ago on Tue 21 Nov 2023 14:30:20 UTC.
Installed Environment Groups:
(And each group here includes more groups until they reach packages, too much to list here.)
EDIT: Since I don’t know what causes the issue, I suppose it might be possible for group packages to end up marked user installed, though it wasn’t the case for me. But in which case, they will be removed despite belonging to a group. I haven’t found a way to restore group marks, dnf will only mark them as group when they are first removed and then installed via group.
// This would be dangerous if group packages are marked as user installed instead for some reason
dnf group install "Fedora Workstation"