Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Cannot update because I ran out of space (Read 349 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Cannot update because I ran out of space

I have an NVMe drive. It is split in `/home` `/boot` and it seems `/`
If I input `sudo pacman -Syu` and I confirm, I get this output pretty much:
sudo-pacman-update.png

I have 28 GB total for it, I think (it was 30 GB)
Is there a way to clean up previous packages or sth? It doesn't make sense to have reached 30 GB just by downloading packages temporarily (cache)

Anyway, I am completely unfamiliar with the partition of downloading packages, and I am open to suggestions so I can update

Re: Cannot update because I ran out of space

Reply #1
Code: [Select]
pacman -Scc
Cleans up the pkg cache located at /var/cache/pacman/pkg

Once you have space you could install ncdu (terminal) or qdirstat (gui) to see where the space is being used.

Re: Cannot update because I ran out of space

Reply #2
Thank you very much, that did the trick! 15 GB freed!  :D

Re: Cannot update because I ran out of space

Reply #3
-Sc is a lot safer than -Scc, because it keeps the currently installed package versions so you can downgrade if there's a problem on an update. -Scc just deletes EVERYTHING in the cache! I'd recommend running -Sc after rebooting following an update and checking it's still possible to get online, or you could end up having to download packages from the Artix archives with another computer and transferring them over which can be tedious.

You can also automate cache management with various  AUR packages like:
pacman-cleanup-hook - hook to cleanup pacman cache keeping only the installed plus next most recent packages

Re: Cannot update because I ran out of space

Reply #4
There is also another way of managing cached packages, if you enable the Arch extra repo and install pacman-contrib, running the command 'paccache -r' will remove all but the most recent 4 of downloaded packages. By running the command with the '-d' option first (dry-run), you are able to see how much space will be saved before any deleting action is enabled.

If you are not keen on keeping that repo enabled after installing pacman-contrib, just comment it out in /etc/pacman.conf after installation.

Re: Cannot update because I ran out of space

Reply #5
And you always can keep your package cache on a more spacious partition or drive. That what CacheDir in pacman.conf for.