Custom Scripts installed by Apps do not get cleaned up while uninstalling the app

We have an App which sets up Custom Scripts while it is installed. However none of the following commands (which are supposed to delete the App) properly delete the Custom Scripts it created:

bench remove-from-installed-apps my_app
bench uninstall-app my_app
bench remove-app my_app

This doesn’t seem right. Is this a Bug or is there a bench command I don’t know of?

Kind regards,
Jonas
//SEIBERT/MEDIA GmbH

I have not been to a situation where i need to delete a customization done by custom app in js !!!
how weird ha !
if i was you i will look to the custom script doctype since it create them on the database and render them on build so you might need to remove or comment the scripts in the custom script Doctype that related to your unwanted customization …

Custom Scripts are stored in the database so you’ll need to manually delete the said custom scripts via the ui or via the DB.

Same is true with custom fields, print formats and deleted doctypes. :sweat_smile:

1 Like

Yeah, I think it should delete those Custom Scripts. Can you create a GitHub issue for this?

3 Likes

Issue has been created. :slight_smile:

Custom Scripts, Custom Field and Custom App Doctypes are not cleaned up in DB on app removal/uninstall · Issue #6492 · frappe/frappe · GitHub

4 Likes