How to remove a package from Pypi

PythonPypi

Python Problem Overview


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.

Python Solutions


Solution 1 - Python

  • Login.
  • Go to your packages.
  • Check the "remove" checkbox for the particular package.
  • Click "Remove" button.

Solution 2 - Python

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

Solution 3 - Python

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRicoView Question on Stackoverflow
Solution 1 - PythonSimeon VisserView Answer on Stackoverflow
Solution 2 - PythonAll Іѕ VаиітyView Answer on Stackoverflow
Solution 3 - PythonDimitri MerejkowskyView Answer on Stackoverflow