Delete an extension by using the Open VSX administrator API

Delete an extension from your private Open VSX registry by calling the administrator API with an administrator user and a Personal Access Token (PAT).

Prerequisites
  • You have access to the cluster where the Open VSX registry is deployed in the openvsx namespace.

  • You have the kubectl tool installed.

Procedure
  1. Add the Open VSX administrator user and PAT to the database:

    export POSTGRESQL_POD_NAME=$(kubectl get pods -n openvsx \
       -o jsonpath="{.items[*].metadata.name}" | tr ' ' '\n' | grep '^postgresql' | head -n 1)
    kubectl exec -n openvsx "$POSTGRESQL_POD_NAME" -- bash -c \
       "psql -d openvsx -c \"INSERT INTO user_data (id, login_name, role) VALUES (1002, 'openvsx-admin', 'admin');\""
    kubectl exec -n openvsx "$POSTGRESQL_POD_NAME" -- bash -c \
       "psql -d openvsx -c \"INSERT INTO personal_access_token (id, user_data, value, active, created_timestamp, accessed_timestamp, description, notified) VALUES (1002, 1002, '<your_admin_token>', true, current_timestamp, current_timestamp, 'Admin API Token', false);\""

    Use a strong, unique value for <your_admin_token> in production environments.

  2. Delete an extension and all its versions:

    curl -X POST \
      "https://<your_openvsx_server_url>/admin/api/extension/<publisher>/<extension>/delete?token=<your_admin_token>"

    where:

    <your_openvsx_server_url>

    The URL of the Open VSX server.

    <publisher>

    The extension publisher name.

    <extension>

    The extension name.

    <your_admin_token>

    The PAT value created in step 1.

  3. Optional: Delete a specific version of an extension:

    curl -X POST \
      -H "Content-Type: application/json" \
      -d '[{"version": "<version>", "targetPlatform": "<platform>"}]' \
      "https://<your_openvsx_server_url>/admin/api/extension/<publisher>/<extension>/delete?token=<your_admin_token>"

    You can list multiple version and platform pairs in the JSON array.

Verification
  • Refresh the Open VSX registry and verify that the extension no longer appears.