You are not logged in.

#1 2024-04-04 03:28:27

orlfman
Member
Registered: 2007-11-20
Posts: 141

is it possible to move pacman package cache to /tmp ?

is it safe to move the pacman cache from /var/cache/pacman/pkg/ to, say, /tmp/pacman-pkg ? by safe, i mean in the sense that pacman won't complain that the folder is missing after a fresh reboot. i know that means ALL package cache is lost at reboot, but i am personally ok with that. i just don't know if pacman will freak out or automatically create the folder if its missing by default.

why? i have 64gb of ram and in the past, god only knows at this point, years i might have downgraded a package twice. save writes on my nvme's, faster unarchiving, save space. i've been moving a lot of unnecessarily things to /tmp for that sweet ~91gb/s tmpfs.

Last edited by orlfman (2024-04-04 03:30:33)

Offline

#2 2024-04-04 04:10:48

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,401

Re: is it possible to move pacman package cache to /tmp ?

As long as the download size fits in tmpfs size, I think you'll be all right.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#3 2024-04-04 05:32:08

mountaintrek
Member
Registered: 2024-02-01
Posts: 19

Re: is it possible to move pacman package cache to /tmp ?

Check pacman.conf option CacheDir or --cachedir in pacman man page.  It is also talked about in the archwiki, Package cache directory.

Offline

#4 2024-04-05 05:59:39

orlfman
Member
Registered: 2007-11-20
Posts: 141

Re: is it possible to move pacman package cache to /tmp ?

kokoko3k wrote:

As long as the download size fits in tmpfs size, I think you'll be all right.

yup! i just tested and pacman indeed will create the folder, /tmp/pacman-pkg, if it doesn't exist already.

Offline

#5 2024-04-05 06:32:16

walkingstickfan
Member
From: USA
Registered: 2021-05-10
Posts: 105

Re: is it possible to move pacman package cache to /tmp ?

Thank you for asking the question orlfman. Seems like a sweet tip.


Arch Linux with Openbox & Tint2

Offline

Board footer

Powered by FluxBB