Search code examples
javascripthtmlgoogle-apps-script

How do I delete old deployments (versions) in Google Apps Script when I have over 1700 versions that are active or archived?


I have 1748 versions in Google Apps Script including the current version. I am trying to get down to below 200 to get below the 200 maximum coming in June. When I go to Manage Deployments, I see a bunch of versions in Active (versions I don't use anymore) and a bunch of versions in Archived (2 of which I use). I also use the current version.

What am I doing wrong and how to delete more? I'm also considering starting the project over by copying/pasting the current version, but it would be nice to also keep the other 2 versions that I use easily available.

I tried deleting some versions but only 4 of the 1700+ were able to be deleted. I was expecting to be able to delete more versions


Solution

  • As you want to delete active versions, you should evaluate the implications of archiving hundreds of versions compared to copying the versions you want to keep for a new project or starting a new project from scratch.

    For details on how to manually archive a versioned deployment, see Archive a versioned deployment.

    To efficiently do this, you might have to learn new things like how to use the Google Apps Script API and CLASP.

    Resources