Updating with pacman or yay?

:+1:

#bestlinuxcommunityever

2 Likes

silly newbie question here:

does yay have any options to clean up orphaned packages without resorting to pamac or other gui-based tools?

pacman can do that of course. List orphans: pacman -Qdt
Remove them: sudo pacman -Rns $(pacman -Qdtq)

Other/additional options for the remove command could be used as well, like -Rnsc. Always check the output for what is going to be removed and be cautious.

yay can use the same options like pacman. So yay -Qdt does the same for example.

2 Likes

I recommend using pacman to uninstall packages, it can remove both packages from the official repos and foreign packages (including those from the AUR). There is no need to use yay for things that pacman can do.

The only exception where I use yay for something that pacman normally does is to update the system, because it’s less typing: just run yay and it automatically updates the packages from the repos and the packages from the AUR.

Also, unless you’re running low on disk space, there is really no need to remove orphaned packages. Most of them are build dependencies and do not slow down your system in any way.

1 Like

I can highly recommend this video :slight_smile:

2 Likes

This is mostly good advice, but with a couple of bad ones thrown in. There was a topic about this video already, I recommend reading that topic:

3 Likes

do you refer to bleachbit?

thanks all!

Error while updating
~$ yay -Syu
:: Synchronizing package databases…
error: failed retrieving file ‘core.db’ from ind.mirror.pkgbuild.com : Could not resolve host: ind.mirror.pkgbuild.com
error: failed to update core (invalid url for server)
error: failed retrieving file ‘extra.db’ from ind.mirror.pkgbuild.com : Could not resolve host: ind.mirror.pkgbuild.com
error: failed to update extra (invalid url for server)
error: failed retrieving file ‘community.db’ from ind.mirror.pkgbuild.com : Could not resolve host: ind.mirror.pkgbuild.com
error: failed to update community (invalid url for server)
error: failed retrieving file ‘multilib.db’ from ind.mirror.pkgbuild.com : Could not resolve host: ind.mirror.pkgbuild.com
error: failed to update multilib (invalid url for server)
endeavouros is up to date
error: failed to synchronize all databases
error installing repo packages
[ramesh@ramesh ~]$

Update your mirrors with the endeavor welcome application. Then run

sudo pacman -Syyu

It will force a full sync and you should be good.

Otherwise check your internet. Mine does that too occasionally if my internet isn’t working well.

Edit: also yayis the same as yay -Syu

2 Likes

I am hearing a lot about Indian mirrors not working well (or, often, at all). The suggestion is to select Worldwide as your ‘country’ entry (in reflector-simple - or from the Welcome app button), or perhaps rely on German mirrors for now…

2 Likes

Well said. One or other reasons, Indian mirrors are not working properly. As suggested by you, I have changed to Worldwide and Germany. Now updating my system. Thanks to both of you.

for india singapore does also good , i heard :slight_smile:

Hi. Thank you very much for that! I’m new to Endevour and new to arch based distro generally from about a day ago, I noticed that with command just yay, it also updates, is that different from yay - Syu or would that be same? And that would be the only update that I need to perform?

yay and yay -Syu are functionally the same. The only difference is the number of keys you have to press.

5 Likes

Thank you

1 Like

:vulcan_salute: :raised_hand_with_fingers_splayed: :crossed_fingers: :handshake: :call_me_hand: :open_hands: :raised_hand: :rofl:

6 Likes

I have used yay only as it feels simple. I must add I’m new to Endevour and every arch based since like a day so I know very less. But is using yay or similar pacman commands enough to upgrade even when it’s major upgrades like get the desktop environment upgraded when it’s released new?

yay will update the packages installed from the repos and the AUR, no matter what they are.

For more info, please see:

yay --help
man yay
1 Like