How to mass-delete assets

Hi! Is there any way to mass-delete assets from a project? I found this answer from a few years ago that said it was not possible, but I was wondering if there was an update to that.

Assets you uploaded on Glitch will be stored permanently on Glitch CDN if I am correct.

One alternative you can do is to edit the .glitch-assets file in your project and remove unnecessary assets. Or maybe you should contact Glitch instead.

Like @raf555 said, you can’t delete assets from the Glitch CDN. Your best bet is to copy the links to the assets and mail them to Glitch Support (support@glitch.com) and ask for them to be deleted.

You could speed this up by making a program to read the .gltich-assets file.

there’s some info here about it being impossible to delete assets. I should add that you can, however, upload an empty file with the same name to replace the asset that you don’t want anymore. after a while, the original file will fall out of the caches too.

hi, i made a userscript that makes it easier to delete all your assets, rather than clicking on each of the assets and clicking the Delete button:

you can use it by installing it in a userscript manager like Tampermonkey.

image

fun fact: whenever an asset is uploaded to your glitch project, a new JSON object is added into .glitch-assets (which is not a JSON file, just a list of objects corresponding to each asset) with details on the asset like file name, cdn url, etc. but when the asset is deleted, the object corresponding to that asset is not removed, instead a property deleted: true is added.

i may have uploaded my entire screenshots folder to the glitch cdn while testing this userscript to make sure it works

2 Likes

Either I have very bad luck, or it’s just a coincidence that after 4 days of creating this userscript, Glitch decides to redesign their editor which, unfortunately, breaks the userscript.

6 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.