1 npm-dist-tag(1) -- Modify package distribution tags
2 ===================================================
6 npm dist-tag add <pkg>@<version> [<tag>]
7 npm dist-tag rm <pkg> <tag>
8 npm dist-tag ls [<pkg>]
14 Add, remove, and enumerate distribution tags on a package:
17 Tags the specified version of the package with the specified tag, or the
18 `--tag` config if not specified.
21 Clear a tag that is no longer in use from the package.
24 Show all of the dist-tags for a package, defaulting to the package in
27 A tag can be used when installing packages as a reference to a version instead
28 of using a specific version number:
30 npm install <name>@<tag>
32 When installing dependencies, a preferred tagged version may be specified:
34 npm install --tag <tag>
36 This also applies to `npm dedupe`.
38 Publishing a package sets the `latest` tag to the published version unless the
39 `--tag` option is used. For example, `npm publish --tag=beta`.
41 By default, `npm install <pkg>` (without any `@<version>` or `@<tag>`
42 specifier) installs the `latest` tag.
46 Tags can be used to provide an alias instead of version numbers.
48 For example, a project might choose to have multiple streams of development
49 and use a different tag for each stream,
50 e.g., `stable`, `beta`, `dev`, `canary`.
52 By default, the `latest` tag is used by npm to identify the current version of
53 a package, and `npm install <pkg>` (without any `@<version>` or `@<tag>`
54 specifier) installs the `latest` tag. Typically, projects only use the `latest`
55 tag for stable release versions, and use other tags for unstable versions such
58 The `next` tag is used by some projects to identify the upcoming version.
60 By default, other than `latest`, no tag has any special significance to npm
65 This command used to be known as `npm tag`, which only created new tags, and so
66 had a different syntax.
68 Tags must share a namespace with version numbers, because they are specified in
69 the same slot: `npm install <pkg>@<version>` vs `npm install <pkg>@<tag>`.
71 Tags that can be interpreted as valid semver ranges will be rejected. For
72 example, `v1.4` cannot be used as a tag, because it is interpreted by semver as
73 `>=1.4.0 <1.5.0`. See <https://github.com/npm/npm/issues/6082>.
75 The simplest way to avoid semver problems with tags is to use tags that do not
76 begin with a number or the letter `v`.