# 🛠️  Upgrade

***Automatic upgrade***

```bash
source <(curl -s https://raw.githubusercontent.com/validexisinfra/Polkadot/main/upgrademain.sh)
```

***Manual upgrade***

```bash
cd ~/polkadot-sdk
git fetch --all --tags
git checkout polkadot-stable2509-2
git submodule update --init --recursive
rm -rf target/
cargo build --release

sudo systemctl stop polkadot.service
sudo cp target/release/polkadot* /usr/lib/polkadot/

sudo systemctl restart polkadot.service
sudo journalctl -u polkadot.service -f
```
