If you using systemd, run the command below:
sudo systemctl stop osmosisd
sudo rm -f /usr/bin/osmosisd
cd $HOME
rm -rf osmosisd
git clone https://github.com/osmosis-labs/osmosis
cd osmosisd
git checkout v20.1.0
make install
sudo mv $HOME/go/bin/osmosisd /usr/bin/
sudo systemctl start osmosisd