You are not logged in.

#1 2009-09-04 12:06:48

vinoman2
Member
From: Portland Oregon
Registered: 2009-05-21
Posts: 236
Website

Will upgrades fill up root partition? [Solved]

I've noticed over the last month since installing Arch, that when I do upgrades it filling up my root partition.

[davek@arch64 ~]$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2             19228308   5983660  12267896  33% /
none                    962680       144    962536   1% /dev
none                    962680         0    962680   0% /dev/shm
/dev/sda3            134405528   6996148 120581956   6% /home
/dev/sda1               198337     15489    172608   9% /boot

does this mean if I do a -Syu every week the root partition will be filled up in a few months? How do I limit this problem? What can I do to keep it down?

Last edited by vinoman2 (2009-09-04 13:34:17)

Offline

#2 2009-09-04 12:10:58

flowheat
Member
From: Pittsburgh, PA
Registered: 2008-09-23
Posts: 94

Re: Will upgrades fill up root partition? [Solved]

You can always do a pacman -Scc to clear your package cache.  That will clear up a good amount of space, but if you need to downgrade a package you will have to find it on one of the mirrors that house old packages instead of being able to find it on your local machine.

I personally keep my /var on a separate partition.  That's where all the packages you download get stored.  It makes it a little easier to manage and if you put a file system like Reiser on it it will actually boost pacman performance some.

Offline

#3 2009-09-04 12:15:18

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Will upgrades fill up root partition? [Solved]

Packages downloaded during upgrades are stored in /var/cache/pacman/pkg. You can use the -c option of pacman in a sync operation (i.e..: pacman -Sc) to get rid of older packages that are no longer installed. Specify the -c option twice (pacman -Scc) to delete all cached packages.

pacman(8) wrote:

-c, --clean
   Remove packages that are no longer installed from the cache as well
   as currently unused sync databases to free up disk space. When
   pacman downloads packages, it saves them in a cache directory. In
   addition, databases are saved for every sync DB you download from,
   and are not deleted even if they are removed from the configuration
   file pacman.conf(5). Use one --clean switch to only remove packages
   that are no longer installed; use two to remove all packages from
   the cache. In both cases, you will have a yes or no option to
   remove packages and/or unused downloaded databases.

   If you use a network shared cache, see the CleanMethod option in
   pacman.conf(5).

Offline

#4 2009-09-04 12:16:37

vinoman2
Member
From: Portland Oregon
Registered: 2009-05-21
Posts: 236
Website

Re: Will upgrades fill up root partition? [Solved]

Wow, what I difference:

[root@arch64 davek]# pacman -Scc
Cache directory: /var/cache/pacman/pkg/
Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...

Database directory: /var/lib/pacman/
Do you want to remove unused repositories? [Y/n]
Database directory cleaned up
[root@arch64 davek]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2             19228308   4144716  14106840  23% /
none                    962680       144    962536   1% /dev
none                    962680         0    962680   0% /dev/shm
/dev/sda3            134405528   6997932 120580172   6% /home
/dev/sda1               198337     15489    172608   9% /boot
[root@arch64 davek]#

that cleaned up 10%. I'll remember that from now on.

Thanks smile

Offline

#5 2009-09-04 12:21:07

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Will upgrades fill up root partition? [Solved]

[off-topic] I believe you'll find df's -h option quite neat too tongue [/off-topic]

Offline

#6 2009-09-04 12:53:32

jamesbond007
Member
From: Germany
Registered: 2009-06-14
Posts: 150

Re: Will upgrades fill up root partition? [Solved]

Hi, one more question on this topic:

I also have the problem that my root partition is not very big. On the other hand I like to keep the old versions of updated packages (just in case I want/need to downgrade in the future). Would it be a good idea to replace the pkg directory in /var/cache/pacman/ with a symlink pointing to another partition that has a bigger amount of free space?

Offline

#7 2009-09-04 13:46:01

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Will upgrades fill up root partition? [Solved]

jamesbond007 wrote:

Hi, one more question on this topic:

I also have the problem that my root partition is not very big. On the other hand I like to keep the old versions of updated packages (just in case I want/need to downgrade in the future). Would it be a good idea to replace the pkg directory in /var/cache/pacman/ with a symlink pointing to another partition that has a bigger amount of free space?

definitely yes

you can also just configure CacheDir in pacman.conf to directly point at the new location


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#8 2009-09-04 15:08:16

jamesbond007
Member
From: Germany
Registered: 2009-06-14
Posts: 150

Re: Will upgrades fill up root partition? [Solved]

shining wrote:

you can also just configure CacheDir in pacman.conf to directly point at the new location

Thx shining, that's even better!

Offline

Board footer

Powered by FluxBB