Thursday, 25 July 2024

Uninstall Salesforce CLI from macOS, Linux and Windows

Hi,

If you are facing issues with VS Code with Salesforce CLI then follow the instructions below to uninstall completely. Once un install is completed then you can re install for better performance.

The method to uninstall Salesforce CLI differs depending on whether you used an operating-specific installer or npm

If  You Installed on macOS or Linux Using the Installers or TAR Files


macOS or Linux


Enter all these commands in a terminal to remove Salesforce CLI. The commands uninstall both sfdx (v7) and sf (v1 and v2).

sudo rm -rf /usr/local/sfdx
sudo rm -rf /usr/local/lib/sfdx
sudo rm -rf /usr/local/bin/sfdx
sudo rm -rf ~/.local/share/sfdx ~/.config/sfdx ~/.cache/sfdx
sudo rm -rf ~/Library/Caches/sfdx
sudo rm -rf /usr/local/sf
sudo rm -rf /usr/local/bin/sf
sudo rm -rf ~/.local/share/sf ~/.config/sf ~/.cache/sf
sudo rm -rf ~/Library/Caches/sf


If you Installed on Windows Using the Installer


These steps uninstall both sfdx (v7) and sf (v1 and v2):

  1. Select Start > Control Panel > Programs > Programs and Features.
  2. Select @salesforce/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


If You Installed Using npm


To uninstall sfdx (v7), run this npm command from a terminal or command prompt:

    npm uninstall sfdx-cli --global

To uninstall sf (v1 or v2), run this command:
    
    npm uninstall @salesforce/cli --global

Inside your home directory, delete these two directories.

    • Library/Caches/sfdx (On Windows: Library\Caches\sfdx)
    • Library/Caches/sf (On Windows: Library\Caches\sf)



Reference:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_uninstall.htm



No comments:

Post a Comment

What’s the difference between Einstein Article Recommendations and Suggested Articles?

How Does Einstein Article Recommendations Work? Einstein Article Recommendations helps support agents resolve customer cases efficiently by ...