Skip to content

Is it bad to use "-Syu" every time I install a package through pacman?

Every time I want to install something using pacman I always use:

pacman -Syu <package>

But when I see application installation/config instructions online, it usually says:

pacman -S <package>

If I understand correctly, -Syu will just make sure all my packages are up to date before installing <package>; is this correct? Is there any problems associated with doing this for each install?

12 points15 comments
Open on Reddit
About this post
Posted
Archived
Score
12 · 100% up
Kind
Text
ID
sfmtj

Author

10
posts
50
comments
4
media
View profile

16 comments

Doing -Syu when installing a package may take longer but is preferred.

It's -Sy package that is to be avoided at all costs as this updates the database but doesn't upgrade packages and can result in version conflicts and breakage.

8 points

Actually if your installing Program A that requires LibB >=2.0, but you only have LibB 1.9 pacman will add the newest version to the install list as it would with any dependencies. In the rare event the packager hasn't set the minimal dependency versions correctly your new program will simply not start and a simple -Su afterwards will fix it.

Though if it's boot/kernel related and you don't catch it till you reboot, prepare to be chroot'ing in from another system to fix it. ;P

4 points
unknown author

It depends on how often you do a Syu. I do a pacman Syu every day so repeating it again whenever i install a new package is pointless and just wastes time.

5 points

It is better to Syu before you install a package, because a package could require a specific version of a package that your local pacman db does not know about yet

4 points

I thought packages did a version check of the dependencies.

3 points

actually, it will just try and fail to get the old versions of the files. Happened to me a couple of times

1 points

On a related question, is it bad to use yaourt for updates?

yaourt -Syua
2 points
unknown author1 hidden

Nope. Yaourt is just a wrapper for pacman, you're doing

pacman -Syu 

with the addition of searching for updated AUR pkgbuilds.

EDIT: If you have yaourt installed, this is the preferred way to update, actually.

4 points

Thanks. I don't remember why I was thinking that yaourt mishandled updates, but I've been using pacman to update from the official repos and only using yaourt for the AUR. I'll start using it for all updates now.

1 points

No, that's not bad. All it'll do is check for new versions of all your packages everytime you install something, which will be slow. It's exactly equivalent to pacman -Syu; pacman -S <package>. Doing pacman -S <package> will pull whatever your computer thinks is the latest rather than what actually is the latest, which will fail if the package has been updated since you last synced, but the only time I've ever encountered this is on an install that hadn't been updated in 3 months. The only thing that should cause problems is pacman -Sy <package> since that'll install the latest version of the package but won't update your system to match, and so if that package's dependencies are out of date it'll install but fail to run.

2 points

You should be okay. Something to keep in mind is to check archlinux.org before you do an -Syu incase something needs manual intervention.

2 points

-S is to install packages, and is generally recommended if you just want to install a new package. unless you are ready to update. I think updating your entire system for one package if the dependency versions didn't change since your last update is a bit overkill, and might lead to unexpected breakage that can take longer to fix, which is bad if you don't have the time.

Just for installing a package, I might at most do an -Sy, but later that day or the next will do a full system upgrade so I don't screw something up on accident.

1 points
unknown author

Deleted before we saved it.

1 points

I actually use -Syyu for my first install for the day to ensure consistency with repos, but I think it's overkill. -Syu is probably enough. Although, I've been using Arch with -Syyu installs daily for several months and it has never broken (on its own, anyway). That's with the testing repo. For a repo that's a day or so behind the mainline kernel, I think that's amazing, compared to when I used to use Ubuntu.

The whole minimal packages thing (well I use XFCE) seems to really increase stability compared to Ubuntu, even with cutting edge packages.

0 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.