65

How do I remove a package from Pypi?

I uploaded a package to Pypi several months ago. The package is now obsolete and I'd like to formally remove it. I cannot find any documentation on how to remove my package.

Rico
  • 5,692
  • 8
  • 46
  • 63

3 Answers3

58
  • Login.
  • Go to your packages.
  • Check the "remove" checkbox for the particular package.
  • Click "Remove" button.
Simeon Visser
  • 118,920
  • 18
  • 185
  • 180
  • Ok, follow-up question...how do I know which "user" registered it? – Rico Dec 05 '13 at 15:08
  • @Rico the username is shown at the bottom of the package page as "Package Index Owner". – Simeon Visser Dec 05 '13 at 15:11
  • Thank you, it looks like there is confusion about users in Pypi. I'll have to take more steps to get to my solution. – Rico Dec 05 '13 at 15:13
  • 2
    Any idea if this still exists? I see that PyPi has added a "yank" option, but can't tell (without registering), if there's still a delete-package option. This has become an issue with package-managers, after the whole `npm` "left-pad" issue. – John C Jun 28 '22 at 19:27
  • Ah, found that I do have a login there - and just checked, yes, "delete" is still an option for packages. – John C Jun 28 '22 at 19:44
25

New PYPI Website

enter image description here

  1. Login to pypi.org
  2. Go to releases
  3. Click delete on options dropdown
  4. Enter the version number confirm
  5. Click Delete Release to delete the release.





original answer

Login in to pypi, select the required package from Your packages

To delete only a version of the package.

select Remove? check box on the individual package version that you want to delete, and click remove.

enter image description here

To delete the package completely

Scroll down until you see the red box saying Do NOT use this button and click Remove this project completely and on the next page, confirm your action. Don't forget that, there is no undo option.

enter image description here

Kermit
  • 4,922
  • 4
  • 42
  • 74
All Іѕ Vаиітy
  • 24,861
  • 16
  • 87
  • 111
8

This is not a really good idea, because all users of the previous package will see their install fails.

If you want to deprecate a package, what you can do is publish a last release with a README pointing to the new package. I did that for python-cli-ui, which is replaced by cli-ui

If you want to get fancy you can also:

  • Add a warning printed when setup.py is run
  • or at import time
  • or replace the package by a dummy one that depends on the new name.
Dimitri Merejkowsky
  • 1,001
  • 10
  • 12
  • 7
    You, sir, vastly overestimate the number of users of my previous packages. :) (Seriously though don't delete packages that people use) – eric Feb 25 '20 at 03:49