Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm ERR! You can no longer unpublish this package. #18505

Closed
c1tt1 opened this issue Sep 12, 2017 · 7 comments
Closed

npm ERR! You can no longer unpublish this package. #18505

c1tt1 opened this issue Sep 12, 2017 · 7 comments

Comments

@c1tt1
Copy link

c1tt1 commented Sep 12, 2017

I have a package on npm that I'd like to remove:

After doing the unpublish command I get the following errors:

npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/ark/.nvm/versions/node/v7.8.0/bin/node" "/Users/ark/.nvm/versions/node/v7.8.0/bin/npm" "unpublish" "reqvest@1.0.0"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code E400

npm ERR! You can no longer unpublish this package.
npm ERR! Please deprecate it instead:
npm ERR! npm deprecate reqvest "this package has been deprecated" : reqvest
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/ark/.npm/_logs/2017-09-12T19_17_51_151Z-debug.log

I am not sure of what's going on and would like to know why.

But my questions are:
Why can't unpublish a package?
Why does the command default to deprecate?
docs.npmjs.com is scarse I found it difficult when it comes to unpublishing packages and can it be improved?
Why hasn't this been fixed as there' been similar issues in past?

@clakech
Copy link

clakech commented Sep 18, 2017

same here, how to unpublish a package ?

@MarcinMoskala
Copy link

Similar problem. I have a package I need to unpublish. How to do it?

@warpdesign
Copy link

There is a reason why you cannot unpublish a package:

It is generally considered bad behavior to remove versions of a library that others are depending on!

For this reason you may only unpublish a package if it has been published in the last 24 hours.

You should contact npm to have an older version unpublished:

With the default registry (registry.npmjs.org), unpublish is only allowed with versions published in the last 24 hours. If you are trying to unpublish a version published longer ago than that, contact support@npmjs.com.

@c1tt1
Copy link
Author

c1tt1 commented Sep 20, 2017

@warpdesign fare point what if you want to actually remove a package not just deprecating it. What if that library wasn't mean to be published?.

@kenany
Copy link
Contributor

kenany commented Sep 20, 2017

@cryst10 Email support@npmjs.com and perhaps they can accomodate.

@c1tt1
Copy link
Author

c1tt1 commented Sep 20, 2017

Ok thanks all, I will close this issue when I get a reply.

@c1tt1
Copy link
Author

c1tt1 commented Sep 24, 2017

It makes sense that before unpublishing a module you'd have to consider the amount of people or devs depending on it.

@c1tt1 c1tt1 closed this as completed Sep 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants