Newer Version Available

This content describes an older version of this product. View Latest

Update the CLI

If you want to ensure that you are running the latest version of Salesforce CLI, you can manually update it.

If You Installed Salesforce CLI Using the Installer

To install the latest Salesforce CLI version, run:
1sfdx update
2sfdx-cli: Updating CLI from 6.0.0-0743bea5 to 6.0.0-aebbfd66 (alpha)... done
3sfdx-cli: Updating CLI... already on latest version: 6.0.0-aebbfd66
4sfdx-cli: Updating plugins... done

By default, the CLI periodically checks for and installs updates. To disable auto-update, set the SFDX_AUTOUPDATE_DISABLE environment variable to true.

If You Installed Salesforce CLI Using npm

The auto-update option is not available. To update Salesforce CLI using npm, run:
1npm install --global sfdx-cli

Windows: Improve CLI Update Speed

Anti-virus software, such as Windows Defender, slows a CLI update because it scans all the files as they are downloaded. To improve the update speed, add the %LOCALAPPDATA%\sfdx directory to the list of directories that are excluded from the scan. We recommend that you consult your security administrator before making this configuration change.

Disable Automatic Update of the CLI and Plug-In

When you run a command, Salesforce CLI checks to see if you have the latest version. If not, the CLI automatically updates itself and the salesforcedx plug-in. You can disable this automatic update with an environment variable.

To remain on the current version of the CLI and disable automatic updates, set the SFDX_AUTOUPDATE_DISABLE environment variable to true. How you set an environment variable is different for different operating systems. See the operating system vendor’s help for instructions on how to set environment variables.