How to download and backup all pacman and pacaur packages?

I would like to have an backup of all pacaur and pacman packages. Example: https://www.archlinux.org/packages/ How to download it all?

217 2 2 silver badges 9 9 bronze badges asked Nov 11, 2020 at 9:35 11 2 2 bronze badges

1 Answer 1

You can download all pacman packages with pacman -Ssq | xargs pacman -Swdd or get the URLs with pacman -Ssq | xargs pacman -Swpdd .

pacman will download them to /var/cache/pacman/pkg but you can change it by changeing CacheDir in /etc/pacman.conf .

AUR packages need to be built, so you would have to build every single AUR package. Some PKGBUILDs (e.g.aur) just install everything with sudo so you would have to check every PKGBUILD.

answered Nov 11, 2020 at 16:31 MaxSilvester MaxSilvester 217 2 2 silver badges 9 9 bronze badges Really thx!! You are a master! There is an way to download pacaur unbuilded? Commented Nov 11, 2020 at 20:47 I would like to download all pacaur even if it is unbuilded. I'm doing a backup of the internet. Commented Nov 11, 2020 at 20:49

It would be hard, because PKGBUILDs contain links to the source files. Some source files are multiple gigabytes big and others may not be available anymore. The source files could include scripts, which could download other files.