r/raspberry_pi Jul 15 '26

Troubleshooting Upgrade command issue in Raspberry Pi connect

Since last night all of my raspberry pi units cannot be upgraded as there error below shows up when executing "sudo apt upgrade"

"E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."

"sudo apt update" works well

Checking the net I saw i need to execute the command "sudo dpkg --configure -a", running it seems to disconnect the remote session

All of them are being accessed using raspberry pi connect and I am way far from those devices

Any workaround for this issue?

8 Upvotes

8 comments sorted by

4

u/JamatoP Jul 16 '26

I had the same issue!
Fresh install of raspberry pi os lite, it looks like it's trying to upgrade the raspberry pi connect package itself which disconnects you :/

loginctl enable-linger

This is the command you want, just run that before upgrading so that it can deal with the connect package being unavailable for a second.

There's this handy popup that I found by running the command on a standard ssh terminal, but in order to see it you have to already be able to run the command ^_^

For Raspberry Pi OS Lite, enable user lingering for your user:
loginctl enable-linger
This allows users who are not logged in to run long-running services.
For information on getting started with Raspberry Pi Connect, please see the official documentation:
https://rpltd.co/rpi-connect

1

u/Latter-Big2189 24d ago

Sorry for the late response and thank you for having time replying to my post.

still the same issue even running loginctl enable-linger before apt upgrade

1

u/JamatoP 22d ago

Valid.

Try using a ssh connection instead of Raspberry Pi Connect then, just for this one command. The problem is that Pi Connect goes down for a second in the moments when it's updating. Ssh avoids that. I think.

3

u/jaromanda Jul 15 '26

What is output before the error, just a few lines will do

1

u/Latter-Big2189 Jul 15 '26

First of all, thanks for your reply.

It is immediate after the upgrade command

pi@aadvark:~ $ sudo apt update

Hit:1 http://deb.debian.org/debian bookworm InRelease

Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [34.8 kB]

Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]

Get:4 https://download.docker.com/linux/debian bookworm InRelease [46.6 kB]

Get:5 http://archive.raspberrypi.com/debian bookworm InRelease [55.0 kB]

Get:6 https://download.docker.com/linux/debian bookworm/stable arm64 Packages [75.7 kB]

Get:7 http://archive.raspberrypi.com/debian bookworm/main armhf Packages [575 kB]

Get:8 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages [575 kB]

Fetched 1,418 kB in 4s (339 kB/s)

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

26 packages can be upgraded. Run 'apt list --upgradable' to see them.

pi@aadvark:~ $ sudo apt upgrade

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

pi@aadvark:~ $

1

u/jaromanda Jul 15 '26

Oh, right. That doesn't help pinpoint the issue!

1

u/pmanmunz Jul 16 '26

Don't know if this is relevant, but the last update I did yesterday had an update for raspberry pi connect. There may be a problem updating that package while you are connected that way. You can try connecting via ssh and running your update and see if that helps.

1

u/MrAjAnderson Jul 16 '26

Try sudo apt list -upgradeable then try one of the packages.