Install Azure CLI 2.0 with zypper

If you are running a distribution that comes with zypper, such as openSUSE or SLES, there is a package available for the Azure CLI. This package has been tested with openSUSE 42.2 and SLES 12 SP 2.


To install the CLI, your distribution must have packages with the following software:


  1. Install curl:

    sudo zypper refresh
    sudo zypper install -y curl
  2. Import the Microsoft repository key:

    sudo rpm --import
  3. Create local azure-cli repository information:

    sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=" > /etc/zypp/repos.d/azure-cli.repo'
  4. Update the zypper package index and install:

    sudo zypper refresh
    sudo zypper install -y azure-cli

You can run the CLI with the az command.


You can update the package with the zypper update command.

sudo zypper refresh
sudo zypper update azure-cli


If you decide to uninstall the Azure CLI, we're sorry to see you go. Before you uninstall, use the az feedback command to give some reasons why you chose to uninstall and how the CLI could be improved to help you. Our goal is to make the Azure CLI bug-free and user-friendly. If you encountered a bug, please file a github issue.

  1. Remove the package from your system.

    sudo zypper remove -y azure-cli
  2. If you do not plan to reinstall the CLI, remove the repository information.

    sudo rm /etc/zypp/repos.d/azure-cli.repo
  3. If you removed the repository information, also remove the Microsoft GPG signature key.

    MSFT_KEY=`rpm -qa gpg-pubkey /* --qf "%{version}-%{release} %{summary}\n" | grep Microsoft | awk '{print $1}'`
    sudo rpm -e --allmatches gpg-pubkey-$MSFT_KEY