However, to use the latest features, security patches, and improvements, keeping your Azure CLI up to date is crucial. In this detailed article, I’ll walk you through how to update Azure CLI using multiple methods, tailored for different operating systems and environments. Whether you’re a developer or an admin, this step-by-step tutorial will ensure your Azure CLI stays current.
Table of Contents
- How To Update Azure CLI
- Why You Should Regularly Update Azure CLI
- Method 1: Updating Azure CLI on Windows
- Method 2: Updating Azure CLI on macOS
- Method 3: Updating Azure CLI on Linux
- Using RPM-Based Distros (CentOS, Fedora, RHEL)
- Method 4: Updating Azure CLI in Docker Containers
- Method 5: Updating Azure CLI via Python Pip (Advanced Users)
- Summary Table: Azure CLI Update Methods by Platform
- Final Thoughts
How To Update Azure CLI
Why You Should Regularly Update Azure CLI
Before we jump into the update methods, let’s quickly cover why updating Azure CLI is essential:
- Access to new features: Microsoft continuously adds new commands and capabilities.
- Security patches: Updates often include critical security fixes.
- Bug fixes: Resolve issues that might cause unexpected behavior.
- Improved performance: Optimizations make your CLI experience smoother.
- Compatibility: Stay compatible with the latest Azure services and APIs.
Before updating, it’s good practice to check your current Azure CLI version. Open your terminal or command prompt and run:
az --versionAfter executing the above command, we got the version number as shown in the screenshot below.

Method 1: Updating Azure CLI on Windows
Using the MSI Installer (Recommended)
To update Azure CLI, follow the steps below.
If you installed Azure CLI using the MSI installer on Windows, the easiest way to update is to download and run the latest MSI installer.
- Visit the Azure CLI Windows download page.
- Download the latest MSI installer.

3. Run the installer and follow the prompts. It will detect your existing installation and update it.


Note: This method is preferred for users who installed via MSI because it handles all dependencies and system PATH settings automatically.
Now, let us rerun the command below to check the updated version after the completion of the update process.
az --versionYou can see that the Azure CLI has been updated successfully, as shown in the screenshot below.

Using PowerShell (For Chocolatey Users)
If you installed Azure CLI using Chocolatey, update it via PowerShell:
choco upgrade azure-cliThis command upgrades Azure CLI to the latest version available in the Chocolatey repository.
Method 2: Updating Azure CLI on macOS
Using Homebrew (Recommended for macOS Users)
Homebrew is the most popular package manager for macOS, and if you installed Azure CLI this way, updating is simple.
- Open Terminal.
- Run the following commands:
brew update
brew upgrade azure-clibrew updateUpdates Homebrew itself.brew upgrade azure-cliUpgrades Azure CLI to the latest version.
Using the Manual Installer
If you installed Azure CLI manually via the installer script, you can update by re-running the installation script:
curl -sL https://aka.ms/InstallAzureCLIDeb | bashThis script works for both Debian-based Linux and macOS, and it will update your Azure CLI to the latest version.
Method 3: Updating Azure CLI on Linux
Using Package Managers (Debian/Ubuntu)
If you installed Azure CLI using the official Microsoft repository, update it with:
sudo apt-get update
sudo apt-get install --only-upgrade -y azure-cliThis fetches the latest package lists and upgrades Azure CLI if a newer version exists.
Using RPM-Based Distros (CentOS, Fedora, RHEL)
For RPM-based distributions, update Azure CLI by running:
sudo yum check-update
sudo yum update -y azure-cliOr with dnf On newer Fedora systems:
sudo dnf upgrade -y azure-cliUsing the Install Script (All Linux Distros)
If you installed Azure CLI using the install script, rerun it:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bashThis ensures your installation is the latest version.
Method 4: Updating Azure CLI in Docker Containers
To update Azure CLI in a Docker container:
- Pull the latest Azure CLI image:
docker pull mcr.microsoft.com/azure-cli- Run the container with the updated CLI:
docker run -it mcr.microsoft.com/azure-cliIf you have a custom Dockerfile, update the base image tag to the latest version:
FROM mcr.microsoft.com/azure-cli:latestThen rebuild your container.
Method 5: Updating Azure CLI via Python Pip (Advanced Users)
If you installed Azure CLI using Python’s pip package manager, update it with:
pip install --upgrade azure-cliNote: This method is less common and recommended for advanced users who prefer Python environments. Also, ensure your Python version is compatible with the Azure CLI version.
Summary Table: Azure CLI Update Methods by Platform
| Platform | Update Method | Command/Action | Notes |
|---|---|---|---|
| Windows (MSI) | MSI Installer | Download & run MSI from official site | Recommended for most users |
| Windows (Chocolatey) | Chocolatey Package Manager | choco upgrade azure-cli | For Chocolatey users |
| macOS | Homebrew | brew update && brew upgrade azure-cli | Preferred for macOS users |
| macOS/Linux | Install Script | curl -sL https://aka.ms/InstallAzureCLIDeb | bash | Works on Debian-based Linux & macOS |
| Linux (Debian) | apt-get | sudo apt-get update && sudo apt-get install --only-upgrade -y azure-cli | For Debian/Ubuntu |
| Linux (RPM) | yum/dnf | sudo yum update -y azure-cli or sudo dnf upgrade -y azure-cli | For CentOS/Fedora/RHEL |
| Docker | Pull latest image | docker pull mcr.microsoft.com/azure-cli | Use latest container image |
| Python (pip) | pip | pip install --upgrade azure-cli | For Python-based installations |
Final Thoughts
Keeping your Azure CLI updated is a simple but powerful way to ensure your cloud management journey is secure, efficient, and feature-rich. Whether you’re a developer or an IT administrator, following the methods I’ve outlined in this article will keep you running smoothly.

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
