how to reinstall pacman code example

Example: remove package archlinux

# leaving dependencies
pacman -R <package_name>

# removing dependencies
pacman -Rs <package_name>

# The above may sometimes refuse to run when removing a group which 
# contains otherwise needed packages. In this case try:
pacman -Rsu <package_name>

# To remove a package, its dependencies and all the packages that depend
# on the target package:
pacman -Rsc <package_name>

# To remove a package, which is required by another package, without
# removing the dependent package:
pacman -Rdd <package_name>

# Pacman saves important configuration files when removing certain 
# applications and names them with the extension: .pacsave. To prevent 
# the creation of these backup files use the -n option:
pacman -Rn <package_name>