Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RupertBarrow/297dd8f88503ae5924f9b5c93765c2f8 to your computer and use it in GitHub Desktop.
Save RupertBarrow/297dd8f88503ae5924f9b5c93765c2f8 to your computer and use it in GitHub Desktop.
SFDX - reinstall a new version on MacOS

Type the following commands to uninstall the current version (taken from here):

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

Also,

sudo rm -rf ~/.npm-global/lib/node_modules/sfdx-cli

Download and install the SFDX CLI from here.

Check the version and plugins versions with these commands:

which sfdx
sfdx -v
sfdx plugins --core

and these:

# Update Salesforce to latest version 
#sfdx plugins:install salesforcedx@49.2.3
sfdx plugins:install salesforcedx

# Default install install CLI version 7.36.0
# Update Salesforce DX CLI to more recent version (avoiding bugs in more recent versions)
## There are installed in ~/npm-global/lib/node_modules/sfdx-cli
sfdx plugins:install sfdx-cli@7.63.0

REMEMBER : to avoid auto-update of CLI, set the environment variable SFDX_AUTOUPDATE_DISABLE=true (in ~/.bash_profile, in my case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment