Delete Themes
All themes are deleted, including the currently active theme.
Whether or not any extra files, custom tables or custom database entries are left behind depends on the theme. In 99% of cases, garbage will be left behind because only the theme files get removed.
Unfortunately, there is no uninstall hook for themes, so this behavior is expected and “normal”. Use other tools to clean up theme data completely. Deleting a theme using this tool is the same as going to WP admin – Appearance – Themes and deleting themes one by one.
The list of themes is fetched with wp_get_themes(array('errors' => null))
to include all themes, including broken ones. Then, delete_theme()
is used to delete them, one by one.