12

I had sometime back set the apiVersion CLI Runtime Configuration value globally for all projects to version 45.0 when I signed up for Spring '19 preview sandbox, using the command:

sfdx force:config:set apiVersion=45.0 --global

Now whenever I executed any SFDX command, I would see the following message in the console.

WARNING: apiVersion configuration overridden at "45.0"

While I could have overridden this again locally when say I proceed using future versions, but that would have required me to set this for every local project.

So, how do I reset the global configuration value to be applicable for all projects?

3 Answers 3

15

I had struggled to find this for a bit as I missed the section discussing this in the docs. I realized that the answer was in the same documentation CLI Runtime Configuration Values but was not clearly called out with respect to how to reset global values.

The documentation mentions:

To unset a configuration value, set it to no value. For example, to unset the instanceUrl configuration value:

sfdx force:config:set instanceUrl=

So utilizing the same approach, I was then able to reset the global apiVersion that I had set for my SFDX projects using the below command. Note that command to set any global value (using --global) can be run from either outside or within a SFDX project directory.

sfdx force:config:set apiVersion= --global
1
  • 1
    Thank you!! I had my apiVersion set to 48.0 globally, and this was messing up a python script we have for org setup because the message 'WARNING: apiVersion configuration overridden at "48.0"\n' was being construed as an error. Clearing that out got me all squared away! 👍 Commented May 15, 2020 at 21:44
0

With the current version of SFDX (7.193.2) it should be:

sfdx force:config:unset org-api-version --global
0

The newer sf command is:

> sf config unset org-api-version --global 
Unset Config
=========================
| Name            Success 
| ─────────────── ─────── 
| org-api-version true    
>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .