How to point "latest" dist-tag to a previous version in npm?

Viewed 1596

I have a published project with a few dist-tags: "latest", "dev", and "beta".

I want to know how to point "latest" to a previous version. I know how to bump the version by doing npm version 2.4.7 or npm version patch and I know how to add dist-tags with npm dist-tag add <pkg>@<version> <tag>, but I've been scouring the internet for a way to point the "latest" tag to a previous version, and I've come up empty.

I can't seem to find that info on the official docs at npmjs, and google's top search results are always about updating the version of npm itself. I want to know how to update the version of a package I'm publishing (specifically, how to change what the "latest" dist-tag points to).

Thanks guys

Edit: My best guess is npm dist-tag add <pkg>@<version> <existingTagName> but not sure if this has unwanted side effects.

1 Answers
npm dist-tag add <pkg name>@<version> latest
Related