「You have both SFDX(v7) and SF(v2) of Salesforce CLI installed. Uninstall SFDX(v7) by running `npm uninstall sfdx-cli --global` in your terminal.」

VSCODESalesforceCLIを更新の場合(SFDC(V7)からSF(V2)へ更新)、タイトルのエラーメッセージを表示しました。

対応策は以下です。

Uninstall Salesforce CLI or Plugins

developer.salesforce.com

削除ファイル

C:\Users\「自分のユーザ」\AppData\Local

C:\Program Files

上記フォルダの「SFDX」と「SF」を全部削除してください。

 

更新手順

developer.salesforce.com

英語

    Remove/Uninstall all Salesforce CLIs.
    Remove all the traces like removing the Path entry in System Settings.
     Check the status by running sfdx and sf commands.
 ⑵ 
    Then follow the installtion with npm as described in this link

     Move from sfdx (v7) to sf (v2).
     The main commands are 
     1) npm uninstall sfdx-cli --global 
     2) npm install @salesforce/cli --global. 
     Now both sf and sfdx commands will work as sfdx is now aliased to sf.
     You can verify this by running sf version and sfdx version. Both will return same result.

 

リンク:

salesforce.stackexchange.com