Skip to content

How do I set a package to be installed on my secondary drive ?

Removed before it was archived.

0 points8 comments
Open on Reddit
About this post
Posted
Archived
Deleted on
Score
0 · 50% up
Kind
Text
ID
110f0lo

8 comments

You can set a custom directory on Flatpak, I don't think you can do that easily on Pacman though

5 points

Mount a folder of your second drive where your package is located and copy the package beeforehand onto this folder. You will need a mount for every package.

This is not a really common scenario and for a reason.

Like others said, move different stuff to your second drive for ease of mind.

3 points

Flatpaks or system packages?

Also why?

This isn’t a normal setup, and while it’s not impossible it’s not easy or simple. System Packages aren’t self contained, they throw files all around the filesystem so you can’t just move a single folder and be done, you need to basically have mirror copies of multiple folders and then modify the way pacman installs things if you really want to.

3 points

There is not a simple way to "move" where packages are installed. Since they will have files in multiple different paths. But usually packages aren't specifically huge so if you're space constrained maybe you can move something else to the second drive. A classic example is having the /home directory on a separate drive since this is were most of you personal data (documents, pictures, videos) are likely stored and also where programs generally store their data.

2 points

Depends on yout mounting of drives. Check fstab and make decisions how to split your root, home, and other folders to both drives...

2 points

If you want to use pacman to install packages to a different location, read the following man page. Note: -b, -r, --cachedir, --config, --gpgdir, --hookdir, --logfile, and --sysroot.

I use pacman to work with non default locations in my AUR helper. https://github.com/Cody-Learner/aurch

$ pacman -Sh
usage:  pacman {-S --sync} [options] [package(s)]
options:
  -b, --dbpath <path>  set an alternate database location
  -c, --clean          remove old packages from cache directory (-cc for all)
  -d, --nodeps         skip dependency version checks (-dd to skip all checks)
  -g, --groups         view all members of a package group
                       (-gg to view all groups and members)
  -i, --info           view package information (-ii for extended information)
  -l, --list <repo>    view a list of packages in a repo
  -p, --print          print the targets instead of performing the operation
  -q, --quiet          show less information for query and search
  -r, --root <path>    set an alternate installation root
  -s, --search <regex> search remote repositories for matching strings
  -u, --sysupgrade     upgrade installed packages (-uu enables downgrades)
  -v, --verbose        be verbose
  -w, --downloadonly   download packages but do not install/upgrade anything
  -y, --refresh        download fresh package databases from the server
                       (-yy to force a refresh even if up to date)
      --arch <arch>    set an alternate architecture
      --asdeps         install packages as non-explicitly installed
      --asexplicit     install packages as explicitly installed
      --assume-installed <package=version>
                       add a virtual package to satisfy dependencies
      --cachedir <dir> set an alternate package cache location
      --color <when>   colorize the output
      --config <path>  set an alternate configuration file
      --confirm        always ask for confirmation
      --dbonly         only modify database entries, not package files
      --debug          display debug messages
      --disable-download-timeout
                       use relaxed timeouts for download
      --gpgdir <path>  set an alternate home directory for GnuPG
      --hookdir <dir>  set an alternate hook location
      --ignore <pkg>   ignore a package upgrade (can be used more than once)
      --ignoregroup <grp>
                       ignore a group upgrade (can be used more than once)
      --logfile <path> set an alternate log file
      --needed         do not reinstall up to date packages
      --noconfirm      do not ask for any confirmation
      --noprogressbar  do not show a progress bar when downloading files
      --noscriptlet    do not execute the install scriptlet if one exists
      --overwrite <glob>
                       overwrite conflicting files (can be used more than once)
      --print-format <string>
                       specify how the targets should be printed
      --sysroot        operate on a mounted guest system (root-only)
2 points

Is it dual booted arch installs? If so you can use pacstrap or chroot to do it.

If it's just another drive, it's a whole lot more difficult. You need to configure the drive to be one or more of your root folders, or more often your home dir can be on another drive

1 points

you can't. it's possible to keep /usr on separate partition (therefore drive) though.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.