[SOLVED] Different Commands to Remove Programs

Would someone please tell me the difference(s) between the removal commands:

yay -R < program name >

yay -Rs < program name >

yay -Rns < program name >

Obviously they must do different things in EndeavourOS; what are they?

Thanks!

Lawrence

Yay commands are similar to Pacman’s, so you could have looked them up here:

https://wiki.archlinux.org/index.php/Pacman#Removing_packages

It’s worth a read-through.

1 Like

If you look at the man pages for each command it will help.
man pacman
man yay

1 Like

Thanks to both of you. This explains what I need to know though I saw no mention of the yay -Rns < program name > command.

Anyway, this does clarify things. Thanks again.

Lawrence

The switches are additive so yay -Rns package:
R Remove package
n Save no backup/config files for the package
s Remove dependencies not required by another installed package

You could even tack on a c if your feeling lucky and remove the package and all packages that depend on it.

1 Like

Thank you! I have used the yay -Rns < program name > command before (after reading it some place) but I didn’t know what it actually did and, seeing the other two command (-R and -Rs), I was confused.

Again thanks to you CMarch and to everyone else who cleared this up for me.

Lawrence

P.S. Now I know what that -c appendage does and I’m sure that I’ll never use it!

Been using -Rcs on my archlinux installations since 2009… Just look at removed packages list.

And here is a great command line to remove orphan package:

sudo pacman -Rcs $(pacman -Qdqt)

1 Like