Arch Linux - apt-get update equivalent command?

laukok picture laukok · Mar 30, 2017 · Viewed 20.1k times · Source

What is the command for Arch Linux to update the packages before installing a new package?

For instance, I know that in Ubuntu, I do:

$ sudo apt-get update
$ sudo apt-get <pkg-name>

What about in Arch?

I came across a couple of version, but they don't seem agree with each others. I can't see the consistency there.

eg 1. (it looks tedious to me):

$ sudo pacman -Syy
$ sudo pacman -Su

eg. 2:

$ sudo pacman -Sy

eg. 3:

always use "-Sy" with a "u" i.e. "pacman -Syu" then "pacman -S ", and never "pacman -Sy ".

I am just confused!

Any ideas?

Answer

Deanie picture Deanie · Mar 30, 2017

The equivalent of apt-get update in Arch Linux is pacman -Syy.

pacman -Syu is equivalent to apt-get update && apt-get upgrade.

Might as well make this complete if it stays...

pacman -S <package> is apt-get install <package>