Forrest logo
back to the yay tool

yay:tldr:e54c9

yay: Remove an installed package and both its dependencies and configuration files.
$ yay -Rns ${package_name}
try on your machine

The command "yay -Rns ${package_name}" is a command used in Arch Linux and its derivatives (like Manjaro) to remove a package completely from the system. Let's break it down:

  • "yay": "yay" is an AUR (Arch User Repository) helper tool that allows users to search, install, and manage packages from both official Arch repositories and AUR. In this command, "yay" is the command itself.

  • "-Rns": These are flags or options for the "yay" command:

    • "-R": This flag is used to remove a package from the system.

    • "-n": This flag is used to avoid removing all unneeded dependencies, which means only the specified package will be removed.

    • "-s": This flag is used to search for packages in the AUR. In this command, it is not actually used for searching, but it is just a requirement for using the previous flags.

  • "${package_name}": This is a placeholder for the actual name of the package that you want to remove. You need to replace "${package_name}" with the name of the package you want to uninstall.

So, when you run "yay -Rns ${package_name}", it will remove the specified package along with its unneeded dependencies, making sure that nothing related to that package remains on the system.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the yay tool