Thursday, 17 May 2012

Two simple yaourt tips

Just a quick post to improve your experience with yaourt. For many it will be straighforward but maybe it will be useful for others.

If yaourt asks too much...

If you fed up with these questions asked all the time by yaourt:
Edit PKGBUILD ? [Y/n] ("A" to abort)
Edit <pkg_name>.install ? [Y/n] ("A" to abort)
Continue building <pkg_name> ? [Y/n]

The simple solution is to create a .yaourtrc under your home directory and configure yaourt to your taste. You can use the global /etc/yaourtrc file as a sample:

cp /etc/yaourtrc ~/.yaourtrc

Edit .yaourtrc to your liking according to

I simply edited two lines:


These two will prevent yaourt to ask for editing anything and for continuing the build, it will skip these steps and will build the packages for you automatically. Still it will leave you some manual controls not to install anything unintentionally:
  • When you do system upgrade ( yaourt -Syua ), it will tell you what packages are to be installed and will ask "Continue upgrade ? [Y/n]".
  • It will always ask the last question for installing a package after building it: "Proceed with installation? [Y/n]". 
Search and install interactively

If you use yaourt without options ( i.e. yaourt <pattern> ) it will search packages just it would do with the -Ss option ( i.e. yaourt -Ss <pattern> ) but it will mark the results with numbers and ask if you want to install one of them. Just type the number of the chosen package and hit Enter to install it. If you hit Enter without a number yaourt will quit.

If you have any other tips for yaourt, please do not hesitate to leave a  comment!


  1. On one of my Arch machines, when yaourt fails to build one package, it will stop trying to install all packages. However, on the other Arch machine, it will continue down its list. Any idea how to configure this behavior? I would rather yaourt continue down its list rather than failing out.

  2. I don't know about such a setting in yaourt. I recommend you to check the differences between the yaourt config files on the two machines. The main yaourt config is /etc/yaourtrc, the user's config file is ~/.yaourtrc
    I hope it helps.

  3. Never have this as a default, if anything just use --noconfirm on a single package. Being able to read the comments before continuing can be very useful.

  4. I recommend a bash alias instead, this is mine in my .bashrc:
    alias ync='yaourt --noconfirm'