npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

undelete

v1.3.1

Published

undeletes packages that have been removed from the NPM (and PyPI!) registry

Readme

undelete

undelete

                   __     __     __     
  __  ______  ____/ /__  / /__  / /____ 
 / / / / __ \/ __  / _ \/ / _ \/ __/ _ \
/ /_/ / / / / /_/ /  __/ /  __/ /_/  __/
\__,_/_/ /_/\__,_/\___/_/\___/\__/\___/

This package "undeletes" a package that has been deleted from the NPM registry. How does it do that? Well, magic of course! No, no ... on the serious tip, the undelete function works by checking secondary NPM mirrors and pulling the files from their cache. This package will also undelete the package metadata which will tell you the NPM user, email and other metadata that's helpful for research purposes.

Overview

When packages are removed from NPM or PyPI (often due to malware detection), they become unavailable through normal channels. This tool recovers those packages by:

  • NPM: Querying Chinese mirror servers (cnpmjs, npmmirror, Huawei, Tencent) that may still have cached copies
  • PyPI: Using ecosyste.ms which indexes files.pythonhosted.org URLs that often remain accessible

This is particularly useful for security researchers analyzing malicious packages that have been taken down.

How to install

npm install undelete

Usage

undelete <registry> <package-name> [options]

Requires Node.js 14+.

Usage

undelete <registry> <package-name> [options]

Registries

| Registry | Description | |----------|-------------| | npm | NPM (npmjs.org) packages | | pypi | PyPI (pypi.org) Python packages |

Options

| Option | Description | |--------|-------------| | -n, --number <count> | Number of versions to download (1-20, default: 5) | | -p, --path <directory> | Save downloaded packages to specified directory (default: current directory) | | -d, --data | Get package metadata instead of downloading files | | -s, --silent | Silent mode - outputs JSON for --data, suppresses logs otherwise | | -h, --help | Display help message | | -v, --version | Show version |

Examples

Downloading Packages

# Download latest 5 versions of an NPM package
undelete npm express

# Download specific number of versions
undelete npm @angular/core -n 10

# Download to a specific directory
undelete npm lodash --path ./downloads

# Download PyPI package
undelete pypi requests

# Download PyPI package with options
undelete pypi flask -n 3 -p ./malware_samples

Getting Package Metadata

The --data flag retrieves package metadata including maintainer information, which is useful for investigating removed malicious packages.

# Human-readable output
undelete npm express --data

# JSON output (for scripting)
undelete npm mayhem-wma --data --silent

# PyPI metadata
undelete pypi some-package --data -s

Example JSON Output

{
  "package": "mayhem-wma",
  "version": "1.0.1",
  "description": "Mayhem WMA - A professional utility package...",
  "npmUser": "petternilssonorg",
  "npmUserEmail": "[email protected]",
  "maintainers": [
    {
      "name": "petternilssonorg",
      "email": "[email protected]"
    }
  ],
  "repository": "https://github.com/kinexbt/mayhem-wma",
  "license": "MIT",
  "downloads": null,
  "dependentPackages": 0,
  "dependentRepos": 0,
  "firstPublished": "2025-11-20T00:05:31.566Z",
  "lastPublished": "2025-11-20T00:05:31.566Z",
  "isSecurityPlaceholder": true
}

License

MIT

Author

Created by 6mile

Contributing

Issues and pull requests welcome at github.com/6mile/undelete