Getting "Error writing to output file" when running "apt-get update"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 24 — I think
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4 LTS
Apache or nginx version (eg, Apache 2.4.25): not sure
PHP version (eg, 7.4): not sure

My Nextcloud instance died during an auto-update a couple of weeks ago. I’ve been trying to find the cause, and I think it may have something to do with whatever has broken apt-get update. I get the following errors:
Err:5 focal InRelease
Error writing to output file - write (28: No space left on device) [IP: 443]

df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.9G 0 2.9G 0% /dev
tmpfs 593M 2.0M 591M 1% /run
/dev/mapper/ubuntu–vg-ubuntu–lv 39G 38G 0 100% /
tmpfs 2.9G 0 2.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.9G 0 2.9G 0% /sys/fs/cgroup
/dev/sda2 976M 207M 702M 23% /boot
ncdata 1.7T 1.1T 539G 68% /mnt/ncdata
/dev/loop1 384K 384K 0 100% /snap/bpytop/254
/dev/loop0 384K 384K 0 100% /snap/bpytop/255
/dev/loop5 56M 56M 0 100% /snap/core18/2409
/dev/loop3 44M 44M 0 100% /snap/certbot/2192
/dev/loop2 44M 44M 0 100% /snap/certbot/2133
/dev/loop4 56M 56M 0 100% /snap/core18/2344
/dev/loop6 62M 62M 0 100% /snap/core20/1494
/dev/loop7 62M 62M 0 100% /snap/core20/1518
/dev/loop8 68M 68M 0 100% /snap/lxd/22526
/dev/loop9 68M 68M 0 100% /snap/lxd/22753
/dev/loop10 47M 47M 0 100% /snap/snapd/16010
/dev/loop11 47M 47M 0 100% /snap/snapd/16292
tmpfs 593M 0 593M 0% /run/user/1000

I’ve tried the various suggestions for removing apt cruft, all to no avail. At this point, I’m tempted to do a clean Nextcloud install to fix this, but I don’t know that I feel comfortable migrating my configuration to another install.