Keeping your system up to date mostly involves invoking more than a single package manager. This usually results in big shell one-liners saved in your shell history. Topgrade tries to solve this problem by detecting which tools you use and run their appropriate package managers.
Arch Linux users can use the AUR package.
macOS users can install topgrade via Homebrew.
Other systems users can either use
cargo install or use the compiled binaries from the release
page. The compiled binaries contain a self-upgrading feature.
Topgrade isn't guaranteed to work on Rust versions older than the latest stable release. If you intend to install Topgrade using Cargo then you should either install Rust using rustup or use a distribution which ships the latest version of Rust, such as Arch Linux.
topgrade. It will run the following steps:
- Try to self-upgrade if compiled with this feature. On Unix systems Topgrade will also respawn itself if it was upgraded
- Linux: Run the system package manager:
- Arch: Run yay or fall back to pacman
- CentOS/RHEL: Run
- Fedora - Run
- Debian/Ubuntu: Run
apt update && apt dist-upgrade
- Gentoo: Run
layman -s ALL && emerge --sync -q && eix-update && emerge -uDNa world
- openSUSE: Run
zypper refresh && zypper dist-upgrade
- Linux: Run etc-update:
- FreeBSD: Upgrade and audit packages
- Unix: Run
brew update && brew upgrade. This should handle both Homebrew and Linuxbrew
- Unix: Run
nix upgrade-nix && nix --upgrade.
- Windows: Upgrade Powershell modules
- Windows: Upgrade all Chocolatey packages
- Windows: Upgrade all Scoop packages
- Check if the following paths are tracked by Git. If so, pull them:
- Unix: Run zplug update
- Unix: Run fisher
- Unix: Upgrade tmux plugins with TPM
- Update Rustup by running
rustup update. This will also attempt to run
rustup self updatewhen Rustup is installed inside the home directory.
- Run Cargo install-update
- Upgrade Emacs packages (You'll get a better output if you have Paradox installed)
- Upgrade OCaml packages
- Upgrade Python packages installed using pipx
- Upgrade R globally installed packages
- Upgrade Vim/Neovim packages. Works with the following plugin frameworks:
yarn global updateif yarn is installed.
npm update -gif NPM is installed and
npm root -gis a path inside your home directory.
composer global updateif Composer's home directory is inside the home directory of the user.
- Upgrade Atom packages
gem upgrade --user-installif
- Linux: Update Flatpak packages
- Linux: Update snap packages
- Linux: Run fwupdmgr to show firmware upgrade. (View only. No upgrades will actually be performed)
- Run custom defined commands
- Final stage
-t/--tmux- Topgrade will launch itself in a new tmux session. This flag has no effect if Topgrade already runs inside tmux. This is useful when using topgrade on remote systems.
-n/--dry-run- Print what should be run.
--no-system- Skip the system upgrade phase.
--no-git-repos- Don't pull custom git repositories.
--no-emacs- Don't upgrade Emacs packages or configuration files.
You can place a configuration file at
~/.config/topgrade.toml (on macOS
~/Library/Preferences/topgrade.toml).. Here's an example:
git_repos = [ "~/dev/topgrade", ] [pre_commands] "Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" [commands] "Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter"
git_repos- A list of custom Git repositories to pull
pre_commands- Commands to execute before starting any action. If any command fails, Topgrade will not proceed
commands- Custom upgrade steps. If any command fails it will be reported in the summary as all upgrade steps are reported, but it will not cause Topgrade to stop.