Except you totally can’t do this because pacman is needed by so many packages. If you try, you will get something similar to this.
>> yay -Rns pacman
error: failed to prepare transaction (could not satisfy dependencies)
:: removing pacman breaks dependency 'pacman' required by base
:: removing pacman breaks dependency 'pacman' required by expac
:: removing pacman breaks dependency 'pacman' required by pacman-contrib
:: removing pacman breaks dependency 'pacman>=5.0' required by pyalpm
:: removing pacman breaks dependency 'pacman>=5.2' required by yay
It is and it doesn’t. Here is what
yay says about itself. Take a look at dependencies:
yay -Si yay
Repository : endeavouros
Name : yay
Version : 9.4.6-2
Description : Yet another yogurt. Pacman wrapper and AUR helper written in go.
Architecture : x86_64
URL : https://github.com/Jguer/yay
Licenses : GPL
Groups : None
Provides : None
Depends On : pacman>=5.2 sudo git
Optional Deps : None
Conflicts With : None
Replaces : None
Download Size : 2.18 MiB
Installed Size : 6.26 MiB
Packager : EndeavourOS <firstname.lastname@example.org>
Build Date : Sun 01 Mar 2020 08:03:04 AM CST
Validated By : MD5 Sum SHA-256 Sum Signature
You seem to be confused here. Just because it is written in go, doesn’t mean anything about its dependencies. It is just calling pacman and/or libalpm(which is part of pacman).
I am not trying to argue with you for fun here but telling people to remove pacman is a really bad idea. Because, it is probably possible, but it would break your system in a way that wouldn’t be super fun to fix.