You are not logged in.
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
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
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.
-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
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 ![]()
Offline
[off-topic] I believe you'll find df's -h option quite neat too
[/off-topic]
Offline
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
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
you can also just configure CacheDir in pacman.conf to directly point at the new location
Thx shining, that's even better!
Offline