Michael Cole
Michael Cole

Reputation: 16217

How do I delete a NPM project?

I pushed some junk code into npm. How do I delete the project? There's a better alternative. I don't have any users for my project yet.

Thanks!

Mike

Upvotes: 5

Views: 14319

Answers (1)

Michael Cole
Michael Cole

Reputation: 16217

From the man pages npm help unpublish:

DESCRIPTION
       This  removes  a  package version from the registry, deleting its entry
       and removing the tarball.

       If no version is specified, or if all versions  are  removed  then  the
       root package entry is removed from the registry entirely.

The package was still there for me after npm unpublish --force.

npm info listed all the versions. npm unpublish [email protected] --force removed them individually. After that I checked npmjs.org and the package page said: "This package has been unpublished"

Upvotes: 6

Related Questions