---
title: "Upgrade the Sitecore Command Line Interface to version 6"
slug: "upgrade-the-sitecore-command-line-interface-to-version-6"
abstract: "How to upgrade the Sitecore Command Line Interface (CLI) in PowerShell."
---
# Upgrade the Sitecore Command Line Interface to version 6

Sitecore Command Line Interface (CLI) is a tool that you install in PowerShell.

> [!note]
> If you do not have a previous installation of the CLI in your project, follow the steps to [install Sitecore Command Line Interface](https://doc.sitecore.com/xp/en/developers/101/developer-tools/install-sitecore-command-line-interface.html "Install Sitecore Command Line Interface") instead.

To upgrade an existing CLI installation:

1. Update the [Sitecore Management Services](https://doc.sitecore.com/xp/en/developers/101/developer-tools/sitecore-management-services.html "Sitecore Management Services") module.

    > [!important]
    > This is an important step because starting with version 5.1.25 the CLI has a [version compatibility feature](https://doc.sitecore.com/xp/en/developers/101/developer-tools/version-compatibility.html "Version compatibility") that prevents you from running CLI commands with an outdated version of Sitecore Management Services.

2. Update the CLI version:

    ```shell
    dotnet tool update sitecore.cli --version {version}
    ```

    > [!note]
    > To update to the latest available version, you can use the command without providing a version: `dotnet tool update sitecore.cli`.

3. Update the default plugins:
    - To update all the default plugins, run the following command:

        ```shell
        dotnet sitecore plugin init --overwrite
        ```

    - Alternatively, update or add each plugin manually:

        ```shell
        dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Serialization --version {version}
        dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Publishing --version {version}
        dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.Indexing --version {version}
        dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.ResourcePackage --version {version}
        ```

4. If you want to install the database plugin, run the following command:

    ```shell
    dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.database --version {version}
    ```

5. If you want to install the [XM Cloud plugin](https://doc.sitecore.com/xmc/en/developers/xm-cloud/en/xm-cloud-plugin.html), run the following command:

    ```shell
    dotnet sitecore plugin add -n Sitecore.DevEx.Extensibility.XMCloud
    ```

    > [!note]
    > The XM Cloud plugin and the commands provided by it require an instance of [](https://doc.sitecore.com/sai/en/users/sitecoreai/sitecoreai.html).

6. Check your Sitecore CLI version using the following command:

    ```shell
    dotnet sitecore --version
    ```

    If your CLI was updated successfully, it returns the version you specified, such as `6.0.18`.

7. To update the JSON schema, run the following command in your project folder:

    ```shell
    dotnet sitecore init
    ```

8. Check the installed plugins using the following command:

    ```shell
    dotnet sitecore plugin list
    ```

    If your CLI plugins were updated successfully, the command returns the following:

    ```shell
    Sitecore.DevEx.Extensibility.Database v.{version}
    Sitecore.DevEx.Extensibility.Indexing v.{version}
    Sitecore.DevEx.Extensibility.Publishing v.{version}
    Sitecore.DevEx.Extensibility.ResourcePackage v.{version}
    Sitecore.DevEx.Extensibility.Serialization v.{version}
    ```