My /root is full to the brim and I can’t install new packages. My /home has 8 times the space of my /root, but pacman is set to install new packages on /root. Is there a safe way that I can change where pacman permanently installs new packages?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
No, there is no safe way to do this in the long term. From the manual:
-r, –root
Specify an alternative installation root (default is /). This should not be used as a way to install software into /usr/local
instead of /usr. This option is used if you want to install a package on a temporary mounted partition that is “owned” by
another system. NOTE: if database path or logfile are not specified on either the command line or in pacman.conf(5), their
default location will be inside this root path.
This is not a permanent solution. You need to backup your data and resize your partitions.
You could also clean pacman’s cache (-Scc) to free up some space in the short term.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0