> For the complete documentation index, see [llms.txt](https://services.validexis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://services.validexis.com/mainnets/kusama/upgrade.md).

# 🛠️  Upgrade

***Automatic upgrade***

```bash
source <(curl -s https://raw.githubusercontent.com/validexisinfra/Kusama/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 kusama.service
sudo cp target/release/polkadot* /usr/lib/polkadot/

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