Terminal commands to update everything
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.
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 --all
choco outdated -l
choco upgrade all
scoop update --all
scoop cleanup --all
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
and all python packages in the current venv
The first command seems to not work anymore due to the
--format=freeze flags used together. The second command updates
# 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