Uninstalling Yay Package Manager
Uninstall Yay cleanly using your system's package manager.
Standard Method (Recommended)
Use pacman to remove Yay and its explicitly installed dependencies:
- Remove Yay: Execute
sudo pacman -Rns yay
in your terminal. - Clean Dependencies: Remove any orphaned dependencies (packages installed by Yay but no longer needed):
- Run
pacman -Qtdq sudo pacman -Rns -
- Run
Removing Source Installation (Built from Git)
If you installed Yay from source using makepkg
:

- Follow Standard Removal: First, perform the Standard Removal above.
- Delete Source Directory: Manually remove the Yay source directory (e.g.,
rm -rf ~/yay
).
Removing Rust/Cargo Installation
If you installed Yay via Rust's cargo
:
- Uninstall with Cargo: Run
cargo uninstall yay
. - Remove Configuration Files: Execute
rm -rf ~/.config/yay
.
Manual Removal (Use with Caution)
Avoid manually deleting files. If necessary post-package-manager removal:
- Remove Config Files: Delete
~/.config/yay
. - Remove Cache: Delete
~/.cache/yay
.
Critical Notes
- Always Prioritize pacman: Use
sudo pacman -Rns yay
as the primary uninstall method. - Review Orphans Carefully: Verify output from
pacman -Qtdq
before removing orphans. - Never Skip '-ns': Ensure
-Rns
flags are used to remove dependencies and configuration files. - Manual Delete Risks: Only manually delete config/cache after package manager removal.