Step 1: Check Your Current Version
Before upgrading, it’s helpful to know which version you are currently running. Open your terminal and type:
Bash
gh --version
If you see a version number and a notification that a newer version is available, it’s time to update!
Step 2: Upgrade Based on Your OS
macOS
If you installed GitHub CLI using Homebrew (the most common method for Mac users), upgrading is a simple one-liner:
Bash
brew upgrade gh
Windows
On Windows, your upgrade path depends on how you originally installed it:
- WinGet:PowerShell
winget upgrade --id GitHub.cli - Chocolatey:PowerShell
choco upgrade gh - Scoop:PowerShell
scoop update gh - MSI Installer: If you used the
.msiinstaller, simply download the latest version from the official releases page and run it; it will overwrite the old version.
Linux
For Linux users, you’ll typically use your package manager.
- Ubuntu / Debian / Raspberry Pi OS:Bash
sudo apt update sudo apt install gh - Fedora / CentOS:Bash
sudo dnf upgrade gh - Arch Linux:Bash
sudo pacman -Syu github-cli
Step 3: Verify the Upgrade
Once the process finishes, verify that you are on the latest version by running the version command again:
Bash
gh --version
Bonus: Keeping Authenticated
Upgrading shouldn’t affect your login status, but if you ever run into permission issues after an update, you can re-authenticate easily:
Bash
gh auth login
