Hello,
I seem to be one of the users who has a somewhat "corrupted" package database.
The system has been only upgraded so far and was initially installed with "yum".
If I run "autoremove", then I get the following (long) list where surely not everything can be removed.
Can someone please prepare a command for me to mark the "relevant" packages as "explicitly installed"?
List: https://pastebin.com/uanFQiAV
Thanks in advance
Manuel
On Mon, 23 Dec 2019 18:04:28 +0100 Manuel Reimer mail+fedora@m-reimer.de wrote:
Hello,
I seem to be one of the users who has a somewhat "corrupted" package database.
The system has been only upgraded so far and was initially installed with "yum".
If I run "autoremove", then I get the following (long) list where surely not everything can be removed.
Can someone please prepare a command for me to mark the "relevant" packages as "explicitly installed"?
I'm not quite sure what you mean, as I haven't used the command autoremove.
The way to correct a corrupted rpm database, is to run as sudo or su or root the command: rpm --rebuilddb This tells rpm to look at the installed packages, and rebuild its db using them. All package managers use the rpm db, so this should fix any packages that are installed but missing.
However, if murphy's law strikes and it doesn't, then I have attached a dnf command that should work by reinstalling all the packages. It is a bash script, so it will need exec permissions.
If this still doesn't work, try replacing the reinstall with install in the script.
On 12/23/19 9:04 AM, Manuel Reimer wrote:
I seem to be one of the users who has a somewhat "corrupted" package database.
Why do you think your package database is corrupted? If it's because of this autoremove issue, then you don't really have a problem.
The system has been only upgraded so far and was initially installed with "yum".
I think the metadata store is different between yum and dnf, so if you initially installed with yum, then dnf won't have all the right info.
If I run "autoremove", then I get the following (long) list where surely not everything can be removed.
Why are you trying to do this? There is no easy way to mark the necessary packages. It's a very manual process and somewhat specific to the person doing it. Unless you have a specific concern, it's not worth it.
On Mon, 23 Dec 2019 at 21:53, Samuel Sieb samuel@sieb.net wrote:
On 12/23/19 9:04 AM, Manuel Reimer wrote:
If I run "autoremove", then I get the following (long) list where surely not everything can be removed.
Why are you trying to do this? There is no easy way to mark the necessary packages. It's a very manual process and somewhat specific to the person doing it. Unless you have a specific concern, it's not worth it.
So out of interest i ran 'dnf grouplist -v' (after checking autoremove)
and notice that I no longer have a group installed. As i use xfce base i ran 'dnf group install xfce-desktop-environment' . Didn't really fix my autoremove list much, added 1 to it :) Anyway, just wondering if this might help with some of the more basic packages listed - firewalld etc. :/
On 23.12.19 22:52, Samuel Sieb wrote:
Why do you think your package database is corrupted? If it's because of this autoremove issue, then you don't really have a problem.
What I want to do is to clean up my installed packages. I want to get rid of packages that have been left in the past while upgrading between releases. Especially packages that have been installed as dependency of long gone packages.
That's what I thought "dnf autoremove" could help with.
I think the metadata store is different between yum and dnf, so if you initially installed with yum, then dnf won't have all the right info.
Doesn't this make the whole idea of replacing yum with dnf a pretty bad thing? I thought dnf would start with the last yum database right away or they even share the same databases. Isn't yum just a wrapper for dnf on current Fedora installations?
Why are you trying to do this? There is no easy way to mark the necessary packages. It's a very manual process and somewhat specific to the person doing it. Unless you have a specific concern, it's not worth it.
I want to clean up the system. It runs for several years now (without major problems) but I want to swap the hard drive with an SSD and remove some unused stuff before copying the system to the new drive.
I guess a good start could be to install a fresh Fedora installation in a virtual machine and get a list of explicitly installed packages from that. If I mark all these as explicitly installed on the other machine, I think the "autoremove" list could be way shorter.
Manuel