AUR helper that can get a list of package names from a file?

With yaourt you could list all the package names you needed to install from AUR in a file, for example, pkg_frgn_list.txt and then sick yaourt on this file with

yaourt -S --needed - < pkg_frgn_list.txt

I am currently using yay but it can’t do that. Could someone advise a helper that can?

Have you tried with pamac?


Just tested with pamac build $(cat /path/to/file/list.txt)

1 Like
pacman -Qqet | grep -v "$(pacman -Qqg)" | grep -v "$(pacman -Qqm)" > ~/Dropbox/pkglist.txt

Shoves pkglist.txt in Dropbox for me…

Good idea for a scheduled job.

This has been dead for a long time.

pamac list -m > ~/list.txt

Please read the post you are replying to before actually replying to it. I explicitly said that I’m using yay now and I used past tense regarding yaourt. How more explicit could I be?

The command with yaourt is in my post as a means to demonstrate the result I want to achieve.

Thanks, it’s kind of a solution :slight_smile: But there doesn’t seem to be a way to make pamac skip already installed packages? Well,on a freshly installed systems it is not much of a problem, so thanks again! :slight_smile:

It already does! Try it out yourself.


pamac is your friend.

man pamac

First “pamac list -m -q > ~/pkglist.txt” # Only AUR package names

Then “pamac build $(cat ~/pkglist.txt)” # will build all packages with dependencies and install

1 Like

You can select “N” (which is the default) as it does tell you if the packages are up to date.
If some are not, edit the “pkg.txt” to only include those. AUR packages installed through pamac will be notified when updates are available so second script not needed.

It skips already installed packages only if they are from repos. The packages from AUR it builds anew even if they are already installed.

Only if you don’t select no which is the default when it gets to the build now section. I feel the best solution would be for “pamac-cli” to add “–needed”

pamac build …could do with the --needed flag to prevent building AUR packages again if they are already installed and updates are not available. @philm