8

I´m using yaourt in ArchLinux.

  • Is it possible to do a yaourt -Syu but only including packages from core/extra or what I want?
  • How to update single packages? yaourt -U <package> does not work (could not find or read package). Do I have to use yaourt -S <package>?

EDIT

  • There is a problem with using yaourt -S <package>: If there is no update available, the package will be reinstalled anyway

2 Answers 2

6

For the first point:

Is it possible to do a yaourt -Syu but only including packages from core/extra or what I want?

According to the documentation, pacman (or yaourt in this case) will attempt to read pacman.conf each time it is invoked. So, did you try to comment the sections you don't want to be upgraded?

For the second point:

How to update single packages? yaourt -U <package> does not work (could not find or read package). Do I have to use yaourt -S <package>?

Pacman's install command -S it's, in fact, a synchronization. Installing or upgrading are done in the same way:

$ pacman -S <package>

Or:

$ yaourt -S <package>
1
  • Ok, but with selective update I meant giving the selection in the command line when doing the update.
    – user905686
    May 23, 2012 at 13:00
3

If you want to update just one package in Arch Linux, do the following (please note that # indicates that the command should be run as root)

1) Search the package's name with

$ pacman -Ss keyword

(it prints out here the package's name and other stuff)

2) Run the following command to get the package's URI

# pacman -Syup | grep package's_name

(write the package's name you got in the previous command, now you should get the package's uri)

3) Finally, copy the uri and run the following command to update it

# pacman -U package's_uri

Hope this helps somebody. As a side note, this is not the recommended way to update a package. If possible, upgrade the entire system. However, this is a good way when you just need to update one package and don't have the bandwith to run a full system upgrade (for example, I recently needed to update just the flashplugin package).

1
  • The method to get the URI doesn't seem to work: pacman -Syup | grep linux returns nothing. Further I don't quite get what is the advantage in comparison to pacman -Sy <package> - which just updates the packages given.
    – user905686
    Sep 8, 2015 at 10:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .