You are not logged in.
When pacman downloads packages, it downloads to /var/cache/pacman/pkg/download-XXXXXX, then moves the downloaded packages from that temp directory back to /var/cache/pacman/pkg.
How do I tell pacman to download packages directly to /var/cache/pacman/pkg and not that download-XXXXXX temp directory? The problem is interrupted downloads do not resume and instead download from scratch in a new temp directory.
Last edited by jroovy-11904 (2025-03-16 14:28:16)
Offline
https://man.archlinux.org/man/core/pacm … en#OPTIONS - DisableSandbox will hopefully do.
Though with https://gitlab.archlinux.org/pacman/pacman/-/issues/209 adding an explicit DownloadUser seems to do as well?
Offline
https://man.archlinux.org/man/core/pacm … en#OPTIONS - DisableSandbox will hopefully do.
Though with https://gitlab.archlinux.org/pacman/pacman/-/issues/209 adding an explicit DownloadUser seems to do as well?
Adding
DownloadUser = root
DisableSandbox
to /etc/pacman.conf fixes the issue for me. Thanks!
Offline
Jus adding "DownloadUser = alpm" and removing/commenting "DisableSandbox" again does't suffice?
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Jus adding "DownloadUser = alpm" and removing/commenting "DisableSandbox" again does't suffice?
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
You're right, only DownloadUser is required. Thanks!
(I'll edit my post as resolved)
EDIT:
Wait, how do I edit the subject? I don't see a button/link for that anywhere.
Edit 2:
Wait, nevermind, I figured it out, have to click edit on the initial comment.
Last edited by jroovy-11904 (2025-03-16 14:27:57)
Offline
Another thing to note is if a download is interrupted and a download-* folder is left behind. This folder cannot be cleaned with "pacman -Sc" and must be done manually.
# pacman -Sc
Packages to keep:
All locally installed packages
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove all other packages from cache? [Y/n] y
removing old packages from cache...
error: could not open file /var/cache/pacman/pkg/download-wNOug2: Error reading fd 7
Database directory: /var/lib/pacman/
Hopefully there will be a fix released for sandboxed downloads when there is an interrupted download. Until then `DownloadUser = alpm` it is.
Offline
Maybe wrapping or aliasing 'pacman -Sc / -Scc' with code to delete the leftover dir's, rather than disabling the sandbox feature would be a better alternative?
My thinking is, the pacman sandbox feature is worth the inconvenience of having to manually clean up after.
I use the following in an aur related script as part of a cleanup process.
find "${AURREPO}" -maxdepth 1 -type d -name "download-*" -delete -print
find /build /var/cache/pacman/pkg -maxdepth 1 -type d -name "download-*" -delete
Last edited by NuSkool (2025-04-01 14:39:24)
Scripts I Use : https://github.com/Cody-Learner
grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 7 8745HS w/ Radeon 780M Graphics
grep -m1 'model name' /proc/cpuinfo : Intel(R) N95
grep -m1 'model name' /proc/cpuinfo : AMD Ryzen 5 PRO 2400GE w/ Radeon Vega Graphics
Offline