Apt broken after failed upgrade

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.1.40.1
How are you able to access your server: SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: no

Describe your issue

Nextcloud upgrade failed due to running out of space in /var (side note: a sanity check on this for the upgrade script might be a good thing). The uninstall process hung; I let it sit for an hour and then Ctrl-C’d it. Now apt is broken, surprise.

Of course I’ve tried running apt install -f and dpkg configure -a and both hang on redis-server configuration. What’s best practice for fixing this? Should I try uninstalling and reinstalling redis-server or is there a better approach?

Thanks!

Log of failed Nextcloud upgrade: https://paste.yunohost.org/raw/edizucalow

Log of failed Nextcloud uninstall: https://paste.yunohost.org/raw/zupusemobu

Share relevant logs or error messages

# dpkg --configure -a
Setting up redis-server (5:7.0.15-1~deb12u7) ...

Did you free up some space ?

sudo yunohost tools basic-space-cleanup

Yes, sorry, I assumed that would be evident :disguised_face:

Edit: What I mean is, I had cleared space via clearing journal and log files. Running yunohost tools basic-space-cleanuphangs on the apt phase of the process.

what doessudo systemctl status redis-serverreturn ?

# systemctl status redis-server
● redis-server.service - Advanced key-value store
     Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; preset: enabled)
     Active: deactivating (stop-sigterm) since Sun 2026-07-05 05:31:08 UTC; 15h ago
       Docs: http://redis.io/documentation,
             man:redis-server(1)
   Main PID: 682595 (redis-server)
     Status: "Error trying to save the DB, can't exit."
      Tasks: 5 (limit: 9469)
     Memory: 8.1M
        CPU: 1h 1min 20.230s
     CGroup: /system.slice/redis-server.service
             └─682595 "/usr/bin/redis-server 127.0.0.1:6379"

Jul 05 05:31:08 example.tld systemd[1]: Stopping redis-server.service - Advanced key-value store...
Notice: journal has been rotated since unit was started, output may be incomplete.


# ps aux | grep redis
redis     682595  0.1  0.1  66324 14848 ?        Ssl  Jun01  61:18 /usr/bin/redis-server 127.0.0.1:6379
root     1764470  0.0  0.0   2584   948 ?        S    05:51   0:00 /bin/sh /var/lib/dpkg/info/redis-server.postinst configure 5:7.0.15-1~deb12u7
root     1764553  0.0  0.0  12232  7468 ?        S    05:52   0:00 /usr/bin/perl /usr/bin/deb-systemd-invoke restart redis-server.service
root     1764557  0.0  0.0  16460  5956 ?        S    05:52   0:01 systemctl --quiet --system restart redis-server.service
root     1786768  0.0  0.0   2584   924 pts/8    S+   19:00   0:00 /bin/sh /var/lib/dpkg/info/redis-server.postinst configure 5:7.0.15-1~deb12u7
root     1786865  0.0  0.0  12232  7428 pts/8    S+   19:00   0:00 /usr/bin/perl /usr/bin/deb-systemd-invoke restart redis-server.service
root     1786869  0.0  0.0  16460  5976 pts/8    S+   19:00   0:00 systemctl --quiet --system restart redis-server.service
root     1791385  0.0  0.0   6340  2128 pts/1    S+   21:08   0:00 grep redis

What’s the output of apt update?

# apt update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Hit:2 https://forge.yunohost.org/debian bookworm InRelease                            
Get:5 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [316 kB]
Hit:6 https://dl.yarnpkg.com/debian stable InRelease
Get:7 https://packages.sury.org/php bookworm InRelease [6,133 B]
Get:8 https://packages.sury.org/php bookworm/main amd64 Packages [281 kB]
Fetched 706 kB in 1s (497 kB/s)   
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Have to add this blurb or it won’t let me re-post.

Okay. So I went ahead and killed the original redis process and that seems to have broken up the clot – the pending postinst configure jobs seem to have completed right away and apt install -f completes successfully with “nothing to do.” Redis is now running as expected so I guess this one is resolved.