Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

dnf autoremove killed my installation

Hello everyone,

while fiddling around with fedora23 to get virtualbox running for a win10 VM, I found out I had to do a re-install of it. So, I thought, lets clean up other stuff I don't need, because I had installed quite a bit of unused stuff during that. Now, I did a very dumb thing: sudo dnf autoremove Then another dumb one: y ENTER without checking what exactly it removed. I was thinking: well, I installed everything through DNF, except for a hand full of third-party applications, it can't be that bad.

HUGE mistake. Going casually through the list of removed stuff, I realized firefox was in there (of which I even had a window up and runnung). Intrigued, I checked again and found that basically 90% of my installed packages were a goner. So what to do? I re-installed most of the stuff I thought to be required (including stuff like grub2!!!!) and hoped I slipped through.

But I didn't. After rebooting I am stuck in the UEFI MOK selection window and none of the hashes are working. It should be noted, that secure boot is disabled in the BIOS/UEFI. Booting from a live-ISO, i can still see my existing fedora installation (which btw. is encrypted with LUKS). But I have no idea how to boot from it or how to recover it. It seems dnf has wiped my whole installation, INCLUDING configurations for grub2 and possibly the kernel.

Is there a way to recover? Or am I faster just re-installing? I have a backup of almost everything, so not much lost, but seriously what is it with DNF autoremove?

Any help is appreciated!

PS: (just my 2 cents): autoremove is outreageously dangerous for anyone coming from apt or other package management tools. I don't know the name of every single library working in the background of some applications, and I don't want to learn about them, which is why I expect DNF autoremove to not purge packages which I required 1 hour earlier to boot my machine. That command should be removed or an extra warning should be shown when using it.

dnf autoremove killed my installation

Hello everyone,

while fiddling around with fedora23 to get virtualbox running for a win10 VM, I found out I had to do a re-install of it. So, I thought, lets clean up other stuff I don't need, because I had installed quite a bit of unused stuff during that. Now, I did a very dumb thing: sudo dnf autoremove Then another dumb one: y ENTER without checking what exactly it removed. I was thinking: well, I installed everything through DNF, except for a hand full of third-party applications, it can't be that bad.

HUGE mistake. Going casually through the list of removed stuff, I realized firefox was in there (of which I even had a window up and runnung). Intrigued, I checked again and found that basically 90% of my installed packages were a goner. So what to do? I re-installed most of the stuff I thought to be required (including stuff like grub2!!!!) and hoped I slipped through.

But I didn't. After rebooting I am stuck in the UEFI MOK selection window and none of the hashes are working. It should be noted, that secure boot is disabled in the BIOS/UEFI. Booting from a live-ISO, i can still see my existing fedora installation (which btw. is encrypted with LUKS). But I have no idea how to boot from it or how to recover it. It seems dnf has wiped my whole installation, INCLUDING configurations for grub2 and possibly the kernel.

Is there a way to recover? Or am I faster just re-installing? I have a backup of almost everything, so not much lost, but seriously what is it with DNF autoremove?

Any help is appreciated!

PS: (just my 2 cents): autoremove is outreageously dangerous for anyone coming from apt or other package management tools. I don't know the name of every single library working in the background of some applications, and I don't want to learn about them, which is why I expect DNF autoremove to not purge packages which I required 1 hour earlier to boot my machine. That command should be removed or an extra warning should be shown when using it.


UPDATE: As my attempts at re-enabling boot for my destroyed installation of Fedora 23 failed, my solution was a complete re-install.

Unfortunately, I cannot reproduce the "destroy my system"-autoremove on my fresh install using,

sudo dnf list autoremove

which is why a bug report in that direction would go without evidence.

Looking a bit further, the DNF documentation for autoremove says (http://dnf.readthedocs.org/en/latest/command_ref.html#autoremove-command-label):

Packages listed in installonlypkgs are never automatically removed by this command.

And under the respective config documentation of installonlypkgs (http://dnf.readthedocs.org/en/latest/conf_ref.html#installonlypkgs-label):

List of provide names of packages that should only ever be installed, never upgraded. Kernels in particular fall into this category. These packages are never removed by dnf autoremove even if they were installed as dependencies (see clean_requirements_on_remove for auto removal details). The number of kept package versions is regulated by installonly_limit.

Checking through my DNF configuration on a fresh install, this list seems to be empty or rather the option is not set. Is this considered a bug? Did I look at the wrong place (grep -r "installonlypkgs" in /etc/dnf/ and /etc/yum.repos.d/)?