Debian template failed to update so I used its terminal. It asked me to perform some additional steps. Was it right?

When I updated Debian template (that is default template in my configuration) via Qubes updater it stuck on 84% and remained like this long time, so I had to shut down template to terminate the process. After I tried to update it again it reached 4% and then failed. So I tried to do it through Debian terminal. After sudo apt full-upgrade it failed with message that I need to use sudo dpkg --configure -a command instead (that’s what I did). Then there were logs showing that it’s configuring a lot of things, then successfully finished. After this I tried sudo apt full-upgrade again and instead of updating something it asked me to confirm removing of some ~400mb linux image. That’s what I did.
Did I do everything right? This is serious question since my Debian template is default template for qubes (so this way for sys-net, sys-firewall, sys-usb).
P.S. I googled what does this command but still. There probably is difference between regular Debian OS and Qubes Debian template, so…

Sid you upgrade the debian version? Sounds a bit like it.

If you can run sudo apt upgrade now and it does not complain, this should be ok.

apt freaks out in rather rare occasions, but is reasonably stable as well. that dpkg --reconfigure -a is required when you interrupt apt via CRTL + c or when you terminate the graphical frontend for it.

It is extremely hard to tell what was going on without you providing us with all log messages.


If logs are still kept somewhere there then tell me where to look and I post them. I already shut down template and its terminal.

I assumed so. Just for next time.

From what I can tell from your post it sounds like an apt hickup. Nothing to be concerned about.

I started Debian template and tried to start its terminal but it didn’t start. Then I restarted template again and tried Terminal again and then it successfully started. Sudo apt upgrade returned no errors. By the way I always thought that apt full-upgrade needed for template updating. Seems I was wrong.

yeah your apt full-upgrade lead me to believe that you want to upgrade your debian version.

Breaking apt is something that rarely happens (but does happen sometimes). Its not the end of the world and apt can usually fix itself with a few dpkg --reconfigure -a and so on.
If not you just use a new template. Not super cool on qubes as you may need to rebuild VMs. But not the end of the world either.

1 Like

Is there some way to ensure that Debian template still works fine?

If you can run apt update && apt upgrade and that doesn’t fail your template is ok.

What I meant with “if not” is if that ever happens again and you can not fix it anymore.

Tried. It said that all packages are up to date but then it shown these lines:

> E: Failed to open lock file /var/lib/dpkg/lock-frontend - open (13: Denied access)
> E: Cannot lock dpkg (/var/lib/dpkg/lock-frontend); do you have root rights?

Use sudo to run something with root rights, so:

sudo update && sudo apt upgrade

But maybe consider this before: How to update | Qubes OS

run with sudo (do you have root rights?)

Lots going on here.
Did you do everything right? No. You should have let the updater
continue. What it was doing was configuring the packages after they had been
Because you interrupted this process you had to manually run the
configuration step.

I’d recommend using full-upgrade occasionally - most of the time,
apt upgrade is safer and what you want.

There isn’t a significant difference between the Qubes templates and
vanilla Debian, other than inclusion of Qubes packages, and their usage.
Package manipulation and control are exactly the same

1 Like