How to install all packages in a custom local repository in batch mode



This may be a very silly question. I am new to Manjaro coming from Slackware. I have a set of software packages in my custom local repository. I want to install all of them on another machine in which I have a freshly installed Manjaro.

Thanks for your help.




The following lists all packages from the repo named myrepo:

$ pacman -Ss | grep '^myrepo/'

But we want to see only package names (remove version and installation information):

$ pacman -Ss | grep '^myrepo/' | cut -d' ' -f1

So, now we want to install this list of packages:

$ sudo pacman -S $(pacman -Ss | grep '^myrepo/' | cut -d' ' -f1)


Hello Rahtgaz,

Thank you very much for your help. I will try this and report back.

With regards,



Hello Rahtgaz,

I created my custom local repository by following the procedure given here:

My repository is at /home/custompkgs.

I created the database file of the repository in the same directory as mentioned above using the command

cd /home/custompkgs
repo-add ./custompkgs.db.tar.gz ./*.pkg.tar.xz

I enabled custompkgs repository in /etc/pacman.conf by removing the comments. I also disabled all other internet repositories. After this, when I try the command suggested by Rahtgaz above, I got error message telling that there is no database for my custompkgs repository. But when I checked the directory, custompkgs.db.tar.gz file is present there.

After this, I opened pamac and refreshed the database.

After doing this in pamac, I tried the commands suggested by Rahtgaz for batch installation in the terminal. It worked perfectly.

I am unable to explain, why the database did not load first time.



You have to first add the repo to your pacman.conf like so:

SigLevel = Never #if not using signatures
Server = file///path/to/local/repo

Then do a sudo pacman -Syy, then you can install packages with sudo pacman -S "package name".

To install them all, you can choose them all in your GUI package manager.
Or do sudo pacman -U /path/to/repo/*.pkg.tar.gz.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.