Salesforce has recently deprecated the sfdx force:package:version:create command. sfdx asks us to use the package version create command instead.

Running sf package version create, however, also generates an error:

Warning: package is not a sf command. Did you mean plugins? [y/n]: › Error: Run sf help for a list of available commands.

The documentation is not clear. Why is sf package not available?

1 Answer 1


Actually, sf package * commands are available relatively recently, since the 1.66.2 (Feb 22, 2023) version of the sf executable of Salesforce CLI.

From Salesforce CLI Release Notes (sf Commands):

NEW: We now install some plugins just when you need them, rather than include them automatically in a Salesforce CLI release. Let's use the updated plugin-packaging as an example. The plugin isn't included in sf by default, although sf knows about it. When you run one of the plugin's commands for the first time, such as sf package version create, Salesforce CLI installs the latest released version of the plugin and then runs the command. The installation happens automatically, although we display a little message so you know what's going on. From then on, run any of the commands contained in the plugin as usual. And when you next run sfdx update, if the just-in-time plugin has released a new version, then it's also updated. Just a little just-in-time magic!

I believe that you should update sf:

If you installed sf with the sfdx installers, run sfdx update to update to the latest available stable version. Run sfdx update stable-rc to update to the release candidate. To return to the stable version, run sfdx update stable.

If you installed sf with npm, run npm install @salesforce/cli@latest-rc -g to update to the release candidate. To return to the stable version, run npm install @salesforce/cli@latest -g.

You must log in to answer this question.

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