Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to make yaourt does not reinstall when the package (from AUR) already installed

 $ yaourt -Q jruby
 local/jruby 1.7.3-1

but somehow

 $ yaourt --needed --noconfirm -S jruby

keep redownload (even if it has been downloaded before) and reinstall jruby

share|improve this question
You shouldn't, as PKGBUILD can be out dated at anytime. – warl0ck Mar 21 '13 at 3:55
but it doesn't even updating, the installed version is exactly the same as to be downloaded one – Kokizzu Mar 21 '13 at 4:21
If pkgver+pkgrel+pkgname are unchanged, it's useless to reinstall – Gilles Quenot Mar 21 '13 at 16:26
yes i know, and i do not want to reinstall, i just want it to install when not installed and reinstall when it's already installed but has an update, but yaourt keep reinstalling when the package is from AUR even when there is no new update – Kokizzu Mar 21 '13 at 21:02
up vote 6 down vote accepted

A solution can be made with a simple script:

  1. Open file

    $ vim yaourt-helper.sh
  2. Create script

    _update="yaourt -Syua --noconfirm"
    if ! which $1 2>/dev/null 1>&2; then
       echo 'Package not installed, installing'
       $_update $1
       exit $?;
    echo 'Already installed, checking for upgrade'
  3. Set permissions and execute

$ chmod +x yaourt-helper.sh && ./yaourt-helper.sh jruby

Note: using --noconfirm is dangerous unless your know exactly what you're doing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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