Fedora 32 dom0 removal errors though removed

so just ignore these errors, or what, if anything might need to be done please ? ; The template appears to have been removed so ?? thanks

[dom0 ~]$ sudo dnf remove qubes-template-fedora-32
Dependencies resolved.
================================================================================
 Package                  Arch   Version               Repository          Size
================================================================================
Removing:
 qubes-template-fedora-32 noarch 4.0.1-202006110439    @qubes-dom0-cached 4.3 G

Transaction Summary
================================================================================
Remove  1 Package

Installed size: 4.3 G
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Erasing     : qubes-template-fedora-32-4.0.1-202006110439.noarch          1/1 
warning: file /var/lib/qubes/vm-templates/fedora-32/whitelisted-appmenus.list: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/vm-whitelisted-appmenus.list: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/root.img.part.04: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/root.img.part.03: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/root.img.part.02: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/root.img.part.01: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/root.img.part.00: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/netvm-whitelisted-appmenus.list: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/icon.png: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/clean-volatile.img.tar: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/apps.templates: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/apps.tempicons: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32/apps: remove failed: No such file or directory
warning: file /var/lib/qubes/vm-templates/fedora-32: remove failed: No such file or directory
  Verifying   : qubes-template-fedora-32-4.0.1-202006110439.noarch          1/1

I’ve used qubes for a long time and have had no issues from just ignoring these errors.

I’ve had the same error. Tried find any mentions on the bugs list but couldn’t find it. Maybe it hasn’t been reported yet. Seems harmless, but worth reporting regardless.

@Clodius, would you like to report it? Or should I?

sorry, I am not great with github, if you don’t mind, appreciate the replies

Done.

1 Like

Quoting marmarek:

This is expected and it’s yet another reason for changing how templates are installed (#2534 ). For this issue I guess we can document this is expected behavior…

1 Like

Hi, I have same issue. I have tried to remove template fedora-32 after installing fedora-33 and changing all my app vm’s. Thru the documentation I have followed a few different commands and nothing has removed the template.
I still have the fedora-32 template in the Qube Manager.

From the documentation, I started with this:
$ sudo dnf remove qubes-template-fedora-32
It finished saying: “Complete!” and I went about my business but then I noticed the manager still had it listed.
I ran it again and noticed these errors just before it said “Complete!” :
(I can’t copy from dom0 so hand typing best I can…)
'----
error: %preun(qubes-template-fedora-32-4.0.6-202101091318.noarch) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package qubes-template-fedora-32
Error in PREUN scriptlet in rpm package qubes-template-fedora-32
qubes-template-fedora-32-4.0.6-202101091318.noarch 1/1
'----

From there I tried the instructions “Can not uninstall a VM…” in VM Troubleshooting | Qubes OS

And I also tried various things in this link: Failed to Install Fedora-33-minimal Template (unexpected EOF in archive) - #4 by fepitre

I’ve tried the remove commands using “qubes-template-fedora-32” and also just “fedora-32”

When I try:
$ qvm-remove fedora-32
I get the following error:
VM fedora-32 cannot be removed. It is in use as:
'- global property default_template.

And somewhere in all my mucking about I saw a message that my dvm relied upon it.
My dvm had already been changed to use the new template, fedora-33, and I had changed the name of the dvm to fedora-33-dvm.

Any suggestions? Thanks.

As the error says, change in Global settings the default template to be used.

See also the discussion in Qubes issue #5948.

Thank you fepitre and GWeck,

For Global settings, none of my other vm’s use the fedora-32 template. I have changed them all.
Just to be sure I checked with qvm-prefs for everyone of the qubes and none of them have template=fedora-32 or any other mention of fedora-32.

I followed the discussion in #5948. I have already tried all of it, more than once, tho’ in a haphazard way as I poked around.
I was interested in the last comment by icequbes1 commented Nov 22, 2020.
Not because I ran out of disk space, but with the prospect of re-installing and then trying to delete again.
First I tried:
sudo qubes-dom0-update --action=reinstall qubes-template-fedora-32
But got the error:
“No Match for argument package qubes-template-fedora-32 is not installed
Nothing to download.”
Then I tried:
sudo qubes-dom0-update qubes-template-fedora-32
It ran the transaction check, said it will be installed, Finished Dependency Resolution,…
And now is downloading “qubes-template-fedora-32”.
I will check the output of qvm-prefs before I do anything else.
I will update…

After install here is qvm-prefs:

Any suggestions how to proceed? Or should I start again with the instructions in TemplateVMs | Qubes OS ?

I rebooted and went thru the steps to uninstall again (after the successful re-install above) and all my results are the same.
I still have fedora-32 listed as a template and taking up nearly 5gb apparently.
Where are these files stored? Can I delete them myself?
I’m thinking I may have to re-install Qubes entirely (I have my backups).

try in dom0: sudo qvm-prefs fedora-33 installed_by_rpm False
it should give no error.
then go to Qubes Manager > select template > right click > delete VM > confirm VM name > Enter

It’s fedora-32 not 33 I’m trying to delete (since I upgraded to fedora-33). but you made me take another look at the screenshot above and I am surprised to see installed_by_rpm is set to True ! It was always False before. (Thiings that make you go, hmmm) Anyway, I ran thru changing it to False and tried to delete the qube as you say. But it continues to fail. Very stubborn.
I may take the time over the weekend to re-install and restore my backups. I am assuming the new packages will come with Fedora-33 not 32.

I am assuming the new packages will come with Fedora-33 not 32.

No. if you reinstall qubes 4.04 you will end upwith fedora-32.
If you can, reinstall and remove fedora-32 after install (probably before update, as this may be a regression, but can be related to some other modification)

I am surprised to see installed_by_rpm is set to True !

Expected, as you reinstalled the template. If you install by qubes-dom0-update installed_by_rpm is always set to True.
Usually, if you set it to false, you can just delete it.

Dont manually delete the files. You will break your Qubes.

You have not dealt with the fundamental issue:

The fedora-32 template is used as the default_template. This does not mean
it is used by any qube. It means it is set as default.
You use qubes-prefs to see and alter global settings. (Or look at menu
in Qube Manager)

The failure to reinstall is a peculiarity of rpm based systems. It
expects reinstall to mean the same version as you currently have. If
the repo has an updated version you will hit an error, and the
unhelpful error message you saw.
You work round this either by specifying an update or by reinstalling
the same specified version number you have.

OMG, that’s it! So simple, you saved me hours of work, thank you!
I went back and checked the docs, I missed one line, probably reading too fast, and it really thru me for a loop.
Thanks again, and thanks everyone for pitching in.