How to remove theme files on app uninstall?

Just to clarify where we’re coming from. We’ve tested App Blocks thoroughly and while they work great in most cases, for our app they come with limitations.

Some of the limitations we’ve run into are limited settings (with a maximum of 25 total) and no real modularity with blocks (no content_for support or presets). For merchants this means the sections are less flexible, harder to customize, and don’t behave like the native sections they’re used to working with.

Right now our approach is a hybrid where App Blocks are used only for assets so they get removed on uninstall, while the sections and blocks themselves are added as theme files. Technically this works, but it leaves merchants with sections that remain in their theme but no longer function, which creates a broken and confusing experience.

From a merchant perspective, uninstall should feel complete. If an app installs or edits theme files, the expected behaviour is that those files are removed on uninstall, whether by the app or automatically doesn’t matter, as long as merchants aren’t left with leftovers. That’s why I wanted to revisit this topic, since the last discussion How to delete files when the app is uninstalled? - #4 by Nic-Shopify was marked as solved with App Blocks, but for our use case, that doesn’t actually solve the problem.

Hope this makes more sense!