I'm really enjoying yaourt to search for packages, except then yaourt just tries to ddos me, displaying like 1,000+ packages for some searches...

How can I effectively limit the output length?

For example: sometimes I know that the packages I search for are not in the AUR. How can I tell yaourt to ignore AUR?

Additionally the man tells me that I can yaourt [regexp] for some package. How can I use this to limit the search results?


If you are only searching for standard (non AUR) packages, then you can simply use pacman. This will search for packages only in core, extra and community. (When searching yaourt's only additional functionality is to search aur)

You can then install these packages with yaourt if you like.

If you really want to use yaourt for searching, you can also filter with grep, of course:

yaourt --color -Ss query | grep '^\S*[ce]\w*/' -A1


  • --color forces colorized output (would be normally gone, as it detects its output goes to a pipe)
  • The \S* skips the escape-codes used for colouring, and ensures only the package names are matched (package descriptions always start with four spaces)
  • The [ce]\w*/ matches the prefixes core/, extra/ and community/ in front of package names, but nor aur/
  • The -A1 switch also prints the package description in the line following the match

Try piping the command to less.I don't have Arch to test but here is how it do it with dmesg (or any other command).

dmesg | less

Use the arrow keys to scroll and q to quit.You can also press h to view help for the command

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.