How to force rebuild only all AUR packages

What is the command (if possible) to list all packages which I installed from AUR, so I can rebuild them all? I mean rebuild all even if no update is available.

Try pamac build $(pacman -Qm)

1 Like


pamac build $(pamac list -mq)

Pamac does not have a rebuild option like Yay does. If the package is already in your cache, it will reinstall that instead of actually building it.

              Always build all AUR packages even when a copy is available in cache.
yay -S --rebuildall $(pacman -Qm)

What about the command mentioned here?:

pacman --query --foreign --quiet --explicit

the guide doesn’t say anything about it:

What about it?

That’s the long form of pacman -Qm.

man pamac and pamac list --help does. :wink:

1 Like

After speaking with @guinux (Pamac developer), it turns out that command will rebuild every time. I was not aware of this as it is not documented.

This is not desired behavior and I’ve asked him to add a separate flag for rebuilds. No other AUR helper works this way.

So I was right?

Yes, I just quoted @Tomek’s command since it used pamac for both commands. Keep it simple and don’t mix diferrent things if you don’t have to :wink:

I was surprised of your reply before, as it always rebuild package when I use pamac build

@Yonachan It makes sense that pamac build rebuilds every time. Otherwise I would use pamac install and won’t rebuild if the build already exists.

No, it doesn’t make sense–especially without documentation. No other AUR helper does things like this. There’s a reason why yay -S <package> does not do the same thing as yay -S --rebuild <package>.

Remember, AUR helpers are at the core just pacman wrappers. However, some do a lot more besides that.

:nerd_face: Akchually, using pamac install for the AUR is wrong. It works, because there is a system in the code to look on the AUR if the package is not found in the repo (if the AUR is enabled in Pamac settings), but for the AUR the proper command is pamac build.

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