Deprecate or unpublish an npm package
Support for npm packages is available with Package Management in VSTS and TFS 2017 Update 1 and newer.
There are two options available to remove a version of an npm package from a feed.
- Deprecate: deprecating a version of a package adds a deprecation message that most npm clients, and VSTS, will show whenever the package is viewed or installed. Deprecating a version can help you discourage new usage of it by presenting a warning message when the package is installed.
- Unpublish: Unpublishing a version of a package makes it permanently unavailable for install or restore.
You must be a contributor to deprecate and an owner to unpublish. To deprecate or unpublish a version of a package, choose the package from the Packages menu, and select the appropriate option from the menu under the ellipses.
- Set up the npm client with your feed.
- Deprecate a package by running
npm deprecate <package>[@<version>] <message>.
- Unpublish a package by running
npm unpublish <package>@<version>.
At this time, it's not possible to use
npm unpublish <package> to unpublish all versions.