Welcome to the forum!
There are several things you can do. First of all, as you update the system, packages are downloaded to /var/cache/pacman/pkg
. Normally, only the last two generations of the packages will be kept there, but it could be that you’ve got more (old) packages in there. So best is to clean that out, like so…
sudo paccache -rvk0
Another thing that tends to run away with disk space is if you have a lot of btrfs
snapshots, so it is recommended to periodically delete your older snapshots.
On account of there not being a kernel, this is due to the way the Arch package manager works for updating the system.
First it downloads the packages, then it removes the old kernel(s) and initramfs
image(s), then it updates all packages from what it has downloaded into /var/cache/pacman/pkg
, and only at the end of that process will it copy the new kernel image into /boot
, recreate the initramfs
, and update the boot loader.
The following HowTo will explain to you how to recover from an interrupted update…
Lastly, yet another reason why you may run out of space is due to how btrfs
allocates space. It essentially divides the available space on the volume into 1 GiB chunks, but even though btrfs
is very clever, this could mean that, due to the copy-on-write nature of btrfs
, you may run out of available unallocated blocks.
This can be remedied by balancing the filesystem. What this means is that btrfs
will then attempt to move blocks together — this is however not a defragmentation — in order to free up more unallocated blocks. For details, see…
man btrfs-balance
Note: The command is “btrfs balance
”, but the man
page uses hyphens for the different subcommands of the btrfs
tool.