How to handle a 10GB pacman update
I just got back from a 6 month study abroad in Sweden. It's time to update my PC. I apparently only have 1.9 GB left in root of 25 GB or so, but my pacman update requires 10GB of space. How can I handle this and/or chunk it up to make it manageable?
About this post
- Posted
- Archived
- Score
- 7 · 100% up
- Kind
- Text
- ID
- ccgyug
23 comments
I dont know why anyone else hasn't suggested that you get a flash drive. Not to boot from, but to mount as a pacman package cache. Grab a flash drive, mount it to /var/cache/pacman/pkg, and run your updates. You may have to move the directory that's already there, and make a new one as you can't mount on occupied dirs. The worst that happens is you have to do some extra file movement to get old packages in case you need to downgrade, so definitely move the dir, don't delete it. Edit: very late, slept for too long :c Just wanted to say thanks, kind person, for the gold!
This is the most unix-y answer I've read.
"limited disk space"? Just add more. But for real, the jump from C: and D:/ drives to a single tree with volumes mounted kinda wherever was a rough one. Once I started to understand how it worked, it became a magic bullet for so many of my (self inflicted) storage problems.
Afaik, doing many-disk installs like that (a volume for package cache, one for user files, others for others, etc , etc) is reasonably common among servers -- provided you aren't using fancier things like btrfs instead. I have no idea if it's that great an option on desktop/laptop systems, though. I imagine the biggest problem would be ensuring the disks mount appropriately, and you can still reach an emergency shell if it breaks for some reason. Not impossible, just extra work.
You can usually mount over non-empty directories with
-o nonempty.This. The files won't disappear, they just become inaccessible (although, file handles that are already open are not affected).
First, clear your pacman cache.
Second change your cachedir in pacman.conf. You can specify a partition where you do have enough room or even mount a usb drive and use that as a temporary cachedir.
Third update.
Good luck. Bear in mind updating a rolling release after 6 months may or may not lead to issues.
You could clean your pacman cache if you've exhausted all the other areas.
https://wiki.archlinux.org/index.php/pacman#Cleaning_the_package_cache
I'd consider reinstalling and partition better.
How, pray tell, would I "partition better?"
Bump your root up to 64GB.
LVM. Need more space? Create a partition somewhere, extend your volume and auto-grow your filesystem.
Type that 2 commands:
to free journalctl logs
journalctl --vacuum-size=100Mto free pacman cache
pacman -ScIt should give you some free space without delete important things.
Warning: Not sure how evil this is regarding partial upgrades.
You could write a bash loop that takes the first line/package from checkupdates, upgrade it, clear cache, repeat.
Very evil.
Though you can do something like that either manually or with a bit of extra logic that upgrades independent dependency trees, if that's the only way out - anyway
If you still can’t get enough disk space after exhausting other means, you can upgrade incrementally, say, by a month at a time.
The wiki is about “restore”, but it should work in your case as well:
https://wiki.archlinux.org/index.php/Arch_Linux_Archive#How_to_restore_all_packages_to_a_specific_date
Why ppl always left so small amount of space to /root????
If your /root needs more than a few kilobytes, you are probably doing something wrong.
Why did they call
/root and then also give us/root!?!? :)What I did recently (10GiB update) was to free some space on my /home partition, reallocate it to / using a live cd and after the update I'd just undo those partition changes
Use derverraters answer