Unable to remove fedora-32 template

Hi all.
I’d like to know if is there anyone that has same problem.
→ I’m on Q4.0.
I’ve tried to remove fedora-32 template, but unable.
That’s what happens:

$ sudo dnf remove qubes-template-fedora-32 -y 2>&1 > testlog.txt
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 was supposed to be removed but is not!

--- detail report from testlog.txt :

Dependencies resolved.
================================================================================
 Package                     Arch      Version               Repository    Size
================================================================================
Removing:
 qubes-template-fedora-32    noarch    4.0.6-202101091318    @anaconda    4.6 G

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

Installed size: 4.6 G
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
usage: qvm-template-postprocess [--verbose] [--quiet] [--help] [--really]
                                [--skip-start] [--keep-source]
                                {post-install,pre-remove} name dir
qvm-template-postprocess: error: Qube fedora-32-dvm uses this template
error: %preun(qubes-template-fedora-32-4.0.6-202101091318.noarch) scriptlet failed, exit status 2
  Verifying   : qubes-template-fedora-32-4.0.6-202101091318.noarch          1/1 

Removed:
  qubes-template-fedora-32.noarch 4.0.6-202101091318                            

Complete!

Of course it’s not removed…

Can You suggest me how to solve?
Thanks,
M.

have you make sure fedora-32-dvm is stopped?

Hi,
thanks for your reply.
I’m sure fedora-32-dvm is stopped.
Moreover I’m running 34 right now, that’s why I don’t need it anymore…

Anyway, based on Your suggestion I’ve removed fedora-32-dvm by hand.
After doing it, remove of fedora-32 template is a success…
probably docs need to be updated!

Thanks again,
M.

Obviously you cannot uninstall a template when it is still being used. Not sure how much more explicit the error message could have been.

I think you might have missed this line in your output.

Don’t know…

If I follow a procedure like this:

my expectation is finding a raw saying:

  • remove all dependency of this template before try to remove it, included “system ones”, as “dmv”, or others…

Do You think it’s a my wrong point of view ?

Thanks,

M.

I’ve changed the page to include such advice.

1 Like

Thanks, unman!

@mila, feel free to submit an enhancement request for your idea, if you like.