Newer Version Available

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

Uninstall Salesforce CLI or Plugins

Uninstalling Salesforce CLI removes it entirely from your computer.

macOS or Linux

Enter all these commands in a terminal to remove Salesforce CLI. The commands uninstall both the sfdx and sf executables.

Windows

These steps uninstall both the sfdx and sf executables:

  1. Select Start > Control Panel > Programs > Programs and Features.
  2. Select SFDX CLI, and click Uninstall.
  3. Inside your home directory, delete these two directories:
    • .config\sfdx
    • .config\sf

If Salesforce CLI is still installed, delete these directories:

  • %LOCALAPPDATA%\sfdx
  • %LOCALAPPDATA%\sf

npm

These steps uninstall both the sfdx and sf executables from your computer.

  1. From a terminal or command prompt, run these npm commands to uninstall the two executables:
  2. Inside your home directory, delete these two directories.
    • Library/Caches/sfdx (On Windows: Library\Caches\sfdx)
    • Library/Caches/sf (On Windows: Library\Caches\sf)

Remove Authorization and Log Files

After uninstalling Salesforce CLI, your computer still has data specific to your CLI usage, such as log files and authorization information about the orgs you’ve logged into or created. Retaining these files is useful if you later reinstall Salesforce CLI, because you don’t have to reauthorize these orgs and you can view your old logs. But if you want to remove these files too, run these commands.

On macOS or Linux:

On Windows, delete these directories in your home directory:

  • .sfdx
  • .sf

Uninstall a Plugin

Use the plugins:uninstall command to uninstall a plug-in you’ve previously installed.

Let’s say, for example, that you previously installed a specific version of the auth plug-in, but now you want to go back to the latest version. Uninstalling the plug-in takes you back to the core version that’s bundled with the CLI. Enter this command from a terminal or Windows command prompt:

If the plug-in is standalone and not bundled with the CLI, then uninstalling it removes it from Salesforce CLI.