Upgrade or uninstall Shopify CLI
This reference guide contains information about upgrading, migrating from a legacy version, and uninstalling Shopify CLI.
Upgrade Shopify CLI
Anchor link to section titled "Upgrade Shopify CLI"You can manage upgrades to Shopify CLI with the package manager for your platform. You must use the same package manager to upgrade that you originally used to install Shopify CLI.
For extension development, you might also need to update specific node modules manually to use all of the latest features.
Homebrew (macOS)
Anchor link to section titled "Homebrew (macOS)"
apt (Debian, Ubuntu)
Anchor link to section titled "apt (Debian, Ubuntu)"- Download the latest
.deb
file for Shopify CLI from the releases page. Install the downloaded file and make sure to replace
/path/to/download/shopify-cli-x.y.z.deb
with the path to your file's location:
yum (CentOS 8+, Fedora, Red Hat, SUSE)
Anchor link to section titled "yum (CentOS 8+, Fedora, Red Hat, SUSE)"- Download the latest
.rpm
file for Shopify CLI from the releases page. Install the downloaded file and make sure to replace
/path/to/downloaded/shopify-cli-x.y.x.rpm
with the path to your file's location.
RubyGems (macOS, Linux, Windows 10)
Anchor link to section titled "RubyGems (macOS, Linux, Windows 10)"
Update node modules for extension development
Anchor link to section titled "Update node modules for extension development"For extension development, you might also need to update specific node modules manually to use all of the latest features.
Post-purchase checkout extension
Anchor link to section titled "Post-purchase checkout extension"Uninstall the client library and command line tool:
Yarn (without React):
Yarn (if using React):
NPM (without React):
NPM (if using React):
Install the new client library:
Yarn (without React):
Yarn (if using React):
NPM (without React):
NPM (if using React):
Install the new command line tool:
Yarn:
NPM:
In your extension code, replace all references to the old client library with the new library:
- If you're using React, then replace
@shopify/argo-post-purchase-react
with@shopify/post-purchase-ui-extensions-react
. - If you're not using React, then replace
@shopify/argo-post-purchase
with@shopify/post-purchase-ui-extensions
.
- If you're using React, then replace
Update your scripts in
package.json
to use the newcheckout-ui-extensions-run
:
Product subscription app extension
Anchor link to section titled "Product subscription app extension"Uninstall the client library and command line tool:
Yarn (without React):
Yarn (if using React):
NPM (without React):
NPM (if using React):
Install the new client library:
Yarn (without React):
Yarn (if using React):
NPM (without React):
NPM (if using React):
Install the new command line tool:
Yarn:
NPM:
In your extension code, replace all references to the old client library with the new library:
- If you're using React, then replace
@shopify/argo-admin-react
with@shopify/admin-ui-extensions-react
. - If you're not using React, then replace
@shopify/argo-admin
with@shopify/admin-ui-extensions
.
- If you're using React, then replace
Update your scripts in
package.json
to use the newcheckout-ui-extensions-run
:
Migrate from a legacy version
Anchor link to section titled "Migrate from a legacy version"As of version 0.9.0, Shopify CLI is installed and managed as a software package, instead of as a Git repository. If you’re using a version prior to 0.9.0, then you need to perform a one-time migration to keep using the CLI.
Complete the following steps to remove the legacy version and reinstall Shopify CLI as a package:
- Check if you are using the legacy version.
- Uninstall the legacy Shopify CLI.
- Install the new version.
- Re-authenticate the CLI.
Check if you are using the legacy version
Anchor link to section titled "Check if you are using the legacy version"You can determine if you’re using a legacy version by running the following command. If you get a command not found
error, then you’re using a legacy version.
Uninstall the legacy Shopify App CLI
Anchor link to section titled "Uninstall the legacy Shopify App CLI"To uninstall a legacy version of Shopify CLI, complete the following steps:
- Delete the legacy CLI files.
- Remove the legacy
shopify
command from your shell profile. - Reload your terminal.
Delete the legacy CLI files
Anchor link to section titled "Delete the legacy CLI files"By default, Shopify CLI was installed in your home directory. All the files are contained in a hidden directory called .shopify-app-cli
. Run the following command to delete the directory:
Remove the legacy shopify
command from your shell profile
Anchor link to section titled "Remove the legacy shopify command from your shell profile"During the install process, Shopify CLI added a line to your shell configuration. This line could be located in one of the following files in your home directory:
~/.bash_profile
~/.zshrc
~/.bash_login
~/.profile
~/.config/fish/config.fish
The line will look similar to one of the following examples. The exact syntax depends on your system. Deleting or commenting out the relevant line in your shell profile removes shopify
as a command.
Reload your terminal
Anchor link to section titled "Reload your terminal"For the changes made to your shell profile to take effect, exit your terminal, and start a new one.
- If you try running
shopify
, then you should get acommand not found
error. - If you have the
shopify_api
gem installed, then you might see the following response:
If so, then you also need to upgrade the shopify_api
gem to v9.2.0 or higher to remove a deprecated shopify
command that is contained in that gem.
If you also have the shopify_app
gem (which depends on shopify_api
gem), then you need to install or update shopify_api
first, and then uninstall the older version.
To get a list of the versions of shopify_api
currently installed, run the following command:
To install the latest version, run the following command:
To uninstall the older version, run the following command. Replace x.y.z
with a version number listed from the gem list
command. Repeat as needed.
Install the new version
Anchor link to section titled "Install the new version"After you've finished uninstalling the legacy version, you can install the most recent version of Shopify CLI. Follow the installation instructions for your platform.
Re-authenticate the CLI
Anchor link to section titled "Re-authenticate the CLI"To reauthenticate, with Shopify CLI, enter shopify login
.
Uninstall Shopify CLI
Anchor link to section titled "Uninstall Shopify CLI"Shopify CLI can be removed from your system using the same package manager that you used to install it.
Homebrew (macOS)
Anchor link to section titled "Homebrew (macOS)"
apt (Debian, Ubuntu)
Anchor link to section titled "apt (Debian, Ubuntu)"
yum (CentOS 8+, Fedora, Red Hat, SUSE)
Anchor link to section titled "yum (CentOS 8+, Fedora, Red Hat, SUSE)"
RubyGems (macOS, Linux, Windows 10)
Anchor link to section titled "RubyGems (macOS, Linux, Windows 10)"
Uninstall a legacy version
Anchor link to section titled "Uninstall a legacy version"If you’re using a legacy version of Shopify CLI (lower than 0.9.0
), then you need to uninstall it manually.
- Learn how to create and manage different types of projects with Shopify CLI.
- Familiarize yourself with the core commands for Shopify CLI.