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)