Skip to content

Deleting Versions

Carter Roeser edited this page Apr 12, 2024 · 2 revisions

Cloudflare R2 Configuration

Before running the deletion script, you must set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables to the Cloudflare R2 credentials. You must also set the AWS_ENDPOINT_URL_S3 variable to the Cloudflare R2 endpoint.

export AWS_ACCESS_KEY_ID=<READ_WRITE_ACCESS_KEY>
export AWS_SECRET_ACCESS_KEY=<SECRET_ACCESS_KEY>
export AWS_ENDPOINT_URL_S3=https://<ACCOUNT_ID>.r2.cloudflarestorage.com

Delete Versions

oclif does not provide any built in method to delete old versions from S3 storage. To remove previous versions from the update server, use the following command:

./scripts/delete-s3-version.sh <version>

Where <version> is the version number to delete (e.g. 1.0.0).

You must have jq and aws installed to run this script, and your S3 credentials must be set in the AWS_ environment variables as described above.

Note that this does not remove the latest version from the public / beta release channels or the apt repo, it only removes the ability for users to update to that specific version from the CLI.

Clone this wiki locally