Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a dist-tag in npm?

Tags:

npm

Currently learning npm.

I have 2 dist-tags, beta: 1.0.1 & latest: 1.0.1.

I want to remove beta: 1.0.1 & I'm not able to do it.

I tried the following, doesn't work.

npm dist-tag rm beta 1.0.1  
npm dist-tag rm beta 
npm dist-tag rm 1.0.1

Worst condition, npm docs doesn't have examples on how to remove a dist-tag!

Edit: As suggested, gone through the github page. Contributors asking to update npm. Still didn't work.

like image 911
Sandeep Roy Avatar asked Jul 07 '17 07:07

Sandeep Roy


1 Answers

According to this how-to-npm GitHub issue, you should remove dist-tags like this:

npm dist-tag rm <module name> beta

Where <module name> is copied from "name" parameter in package.json:

{
  "name": "@user/exampleNameOfModule", 
                      ^
  ...                 |
                      - copy this, without quotes
},
like image 79
u32i64 Avatar answered Oct 11 '22 09:10

u32i64