How to Unpublish an npm Package? Please Help! #177847
-
Select Topic AreaQuestion BodyI need to urgently unpublish an npm package that was published approximately one week ago (so it's well past the 72-hour window). Due to the sensitivity of the situation, I'd prefer not to disclose the package name publicly here. Could someone please advise on the correct procedure for unpublishing a package in this case? |
BetaWas this translation helpful?Give feedback.
Replies: 3 comments 7 replies
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If the package was published more than 72 hours ago, you won’t be able to fully unpublish it yourself due to npm’s unpublish policy. After that only the npm support team can intervene.
The package name (you can give this privately in the support form) npm Support will review your case and can either unpublish it or transfer it to a private package if full removal isn’t possible. |
BetaWas this translation helpful?Give feedback.
-
BetaWas this translation helpful?Give feedback.
-
The command below will fail if the package is older than 72 hours:
npm enforces this limit for stability reasons. 📨 2. Contact npm Support (the correct path) You’ll need to open a private support ticket with npm to request package removal. Go to: Then: Log in with the account that owns the package. Choose “Package Takedown Request”. Include: The exact package name. The reason for removal (e.g. sensitive data, security issue, accidental publication). A confirmation that you are the package owner or maintainer. npm’s support team will review and manually process your request. ⚙️ 3. Alternative (Recommended by npm) If you just want to prevent further installs but keep the version history intact:
This is ideal if the issue isn’t legal or security-critical — it preserves stability for others who might depend on it. |
BetaWas this translation helpful?Give feedback.

I found a workaround: while you can't run npm unpublish --force to delete the entire package, you can unpublish a specific version using npm unpublish
<package-name>@<version>. However, npm requires you to keep the latest version. So I just need to clear the content of that version. Even if someone installs my package, they won't see the actual content.