TONINO.

Terminal commands to update everything

Posted on:

Updated on:

This post is for those of you who want to have their tools always at the last, cutting edge version. I tried to put together all the tools that I use daily for my job and for my university studies. Hope this benefits not only me.

Quick note: for some update commands I prepend a command to inspect the current state of the tool. This is useful especially for package managers.

Windows specific

Update wsl:

wsl --update

There is no easy way to update the PowerShell modules installed via Install-Module, but this script does the job perfectly (also removing the packages’ old versions).

Update PowerShell help modules:

Update-Help [-UICulture en-US]

Update package managers’ installed packages:

winget upgrade
winget upgrade --all
choco outdated -l
choco upgrade all
scoop status
scoop update --all
scoop checkup
scoop cleanup --all

Rust

Rust tools:

rustup update

Rust installed binaries are not updated by running the previous command. They need to be explicitly updated. For instance, to update cargo-watch:

cargo install --list
cargo install cargo-watch

Deno

deno upgrade

Python

Updating pip and all python packages in the current venv

The first command seems to not work anymore due to the --outdated and the --format=freeze flags used together. The second command updates only pip.

# python3 -m pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 python3 -m pip install --upgrade
python -m pip install --upgrade pip