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 the Salesforce CLI Using the Installer

By default, the CLI periodically checks for and installs updates. To disable auto-update, set the SFDX_AUTOUPDATE_DISABLE environment variable to true.
To install the latest Salesforce CLI version, run:

If You Installed the Salesforce CLI Using npm

The auto-update option is not available. To update the Salesforce CLI using npm, run:

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.