Different Linux distributions come with different package managers. Assuming you're using Ubuntu or Windows with WSL, you'll use apt
to install neofetch.
Update available packages:
sudo apt update
Install neofetch:
sudo apt install neofetch
And then run it:
neofetch
Uninstall it:
sudo apt remove neofetch
Update all packages:
sudo apt update
sudo apt upgrade