Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile
@webknjaz
webknjaz / delete_em.js
Created September 24, 2026 12:58 — forked from mjeffryes/delete_em.js
Deleting many old prerelease versions from pypi
// PyPI doesn't seem to offer a delete API, so this is my Hack for deleting a large number of prerelease versions:
// 1) Go to the package managmenet page
// 2) Open devetools
// 3) Delete a package manually
// 4) find ths CSRF token from the manual request
// 5) add the token and the versions to deleted to the below code
// ^) execute it in the dev console
token = "your csrf token"
versions = [
{
"id": 1519582,
"name": "Frozen skeleton and awx-migrated filtered branch",
"target": "branch",
"source_type": "Repository",
"source": "ansible/awx-plugins",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
{
"id": 7516970,
"name": "Disallow topic branches upstream, forcing all the work to be in forks",
"target": "branch",
"source_type": "Repository",
"source": "ansible/pylibssh",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [