Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We do not have "uninstall theme" functionality.
For example at uninstall the corresponding records from the {block} table should be removed, and modules need to be able to interact with theme uninstall (as there are modules with db tables which have theme column).
required hooks for theme management:
hook_install
hook_uninstall
hook_themes_enabled
hook_themes_disabled
hook_themes_installed
hook_themes_uninstalled
Comments
Comment #1
jhodgdonSome of these hooks exist, although some are they are not documented.
For instance, functions theme_enable() and theme_disable() currently invoke hook_themes_enabled and hook_themes_disabled, though these hooks are not documented. (Regarding them not being documented, see also #675046: Make sure all hooks in D7 have documentation.)
I'm not sure about the other ones.
These two were added in #491214: implement the top level Appearance / Choose Theme admin page
Comment #2
tim.plunkettMarked #375984: Implement theme uninstall as a duplicate.
Comment #3
lauriiiComment #5
joelpittetClosing for triage but feel free to re-open if there is bit of this remaining. Needs an issue summary update though as half of this has been done elsewhere.