You are not logged in.

#1 2024-09-09 21:11:46

gsgfcsgfd
Member
Registered: 2024-09-09
Posts: 5

[SOLVED] System Upgrade

I want to update all of my packages but I have limited space on my root part. so what I thought about doing and what it seems to be working is to update every package seperatley with pacman -S and then delete the cache wıth pacman -Scc. How can I do this automatically without having to write each 200 something packages seperatley?

EDIT: After reading my post again it seems to be pretty open for misunderstanding so to clarify this is what I want to do:

1. Download and install package x to update it (sudo pacman -Sy x)
2. Delete pacman cache to free up space left by package x (sudo pacman -Scc)
3. repeat for package y, z etc.

SOLUTION: I changed my Pacman cache directory to an external USB. You can do so by changing the destenation from the /etc/pacman.conf file. If you're going to do what I did then make sure that your USB is formatted to ext4 or any other file system that accepts naming files with symbols. Specifically colons. Thank you [ayekat](https://bbs.archlinux.org/profile.php?id=45547) for your help I really appreciate it.

Thank you for reading this far.

Last edited by gsgfcsgfd (2024-09-10 21:56:55)

Offline

#2 2024-09-09 21:28:05

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,650

Re: [SOLVED] System Upgrade

You can create a hook that cleans the cache after every update or install.
https://wiki.archlinux.org/title/Pacman

Offline

#3 2024-09-09 21:36:14

gsgfcsgfd
Member
Registered: 2024-09-09
Posts: 5

Re: [SOLVED] System Upgrade

d_fajardo wrote:

You can create a hook that cleans the cache after every update or install.
https://wiki.archlinux.org/title/Pacman

I already know about this and it won't help my situation. To clarify this is what I want to do:
1. Download and install package x to update it (sudo pacman -Sy x)
2. Delete pacman cache to free up space left by package x (sudo pacman -Scc)
3. repeat for package y, z etc.

Adding a hook wouldn't solve my issue because I'll still have to download each and every package before updating them which I can't do because of the limited space I have.

Last edited by gsgfcsgfd (2024-09-09 21:42:09)

Offline

#4 2024-09-09 21:38:41

ayekat
Member
Registered: 2011-01-17
Posts: 1,611

Re: [SOLVED] System Upgrade

gsgfcsgfd wrote:

[…] what I thought about doing and what it seems to be working is to update every package seperatley with pacman -S and then delete the cache wıth pacman -Scc.

This would be the equivalent of performing many partial upgrades in quick succession, and is generally discouraged if you want to keep your system usable.
The first thing I can see breaking is some library that Pacman depends on being updated in one of those steps, and the subsequent Pacman invocation failing with a .so library error.

Can you tell us a little more about the situation?
If the problem is only your root partition, but there's more space on other partition/filesystem, have you considered putting the Pacman package cache in a different place?
More generally, though, if space on your system partition is a major limitation, have you considered using another distribution for this? Arch Linux tends to package most things with most features enabled, and relatively few packages split up, unlike some other distributions, leading to generally larger-than-average package sizes.


pkgshackscfgblag

Offline

#5 2024-09-09 21:49:46

gsgfcsgfd
Member
Registered: 2024-09-09
Posts: 5

Re: [SOLVED] System Upgrade

ayekat wrote:

have you considered putting the Pacman package cache in a different place?

I have not unfortunately. For some reason I have always thought that the pacman cache can only be stored in /var/cache/pacman/pkg/. I think this would be a perfect solution. Could you tell me how I can go about doing this?

Offline

#6 2024-09-09 22:48:07

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,399
Website

Re: [SOLVED] System Upgrade


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2024-09-10 04:58:18

cryptearth
Member
Registered: 2024-02-03
Posts: 963

Re: [SOLVED] System Upgrade

aside from parking the cache elsewhere:
1) how you ended up with so low space on your root?
2) how about temporary removal of big packages like libreoffice or other big chonkers?
3) you should clean orphans by

pacman -Qdtq | pacman -Rns -

should be done regular anyway

this tends towards XY-problem: you try to deal with a small root partition - instead consider enlarging it (if possible) or setup from scratch with a larger root to begin with

Offline

#8 2024-09-10 21:30:47

gsgfcsgfd
Member
Registered: 2024-09-09
Posts: 5

Re: [SOLVED] System Upgrade

Thank you this was helpful.

Offline

#9 2024-09-10 21:44:02

gsgfcsgfd
Member
Registered: 2024-09-09
Posts: 5

Re: [SOLVED] System Upgrade

cryptearth wrote:

1) how you ended up with so low space on your root?
2) how about temporary removal of big packages like libreoffice or other big chonkers?
3) you should clean orphans by

pacman -Qdtq | pacman -Rns -

should be done regular anyway

1) I heard many people say that you should keep your home and root part. seperate which made sense to me so I wanted to give it a try instead of the usual. I ended up giving the root part. too little space (10GB to be exact) which led to my situation.
2) I tried doing that by starting with Firefox but it seemed kind of too much of a hassle so I dropped it and to be honest I wanted to find a solution different from what's obvious (like updating a package and then deleting the cach)
3) I already do/did that but I still didn't have enough space for a full system update. Also I like to use:

sudo pacman -Rs $(pacman -Qtdq)

instead.

this tends towards XY-problem: you try to deal with a small root partition - instead consider enlarging it (if possible) or setup from scratch with a larger root to begin with

enlarging is indeed a solution. Thank you.

Last edited by gsgfcsgfd (2024-09-10 21:45:06)

Offline

#10 2024-09-10 22:45:15

cryptearth
Member
Registered: 2024-02-03
Posts: 963

Re: [SOLVED] System Upgrade

well - although yes, arch is rather minimalistic and when trimmed down one can get away with just a couple 100 megabytes - but for something more useable a couple of gigabytes are pretty much a must - with 10GB looking like you missed the second 0 when partition the drive
I have my "500gb nominal" 465gib actual system nvme set up this way:

1gb ESP - overkill but more than enough for a couple of bootloaders, kernels and initramdisks
32gb swap - as I only have 32gb of ram and use ZFS along with a couple VMs I actually do kinda need it
100gb root
250gb home
rest (about 82gib or so) shrunk down from home for a windows install - used it to help a co-worker to flash his phone as I couldn't find a way to do it in linux; also using it every once in a while for general system checks (just this weekend I encountered some issue with my gpu - booting windows confirmed it wasn't a hardware fault but some software/driver crap)
overall - depending on how you plan to use your system - from personal experience I would recommend at least 50gb for your system (both linux and windows)

I do remember the late 90s/early 2000s when I had only a 4gb hdd with win98 (first edition) with 64mb ram and a sis gpu with 8mb vram - but it was enough back then: the OS only took a couple 100MBs, the games were rather small and most used the CDs for audio (and hence not needed to copy several GBs of compressed assets) - it were simpler times back then
today you can't even boot a minimal setup as 8mb vram aint enough even for a 16-color console

anyway - TLDR: if possible try to increase the size for your root partition - if not possible: do a proper backup - wipe the drive and start over again with a larger root partition
if that's not an option: I'm sure someone here knows how to offload stuff from root to other partitions without reinstalling from scratch

Offline

Board footer

Powered by FluxBB