Title: deleted_theme
Published: July 20, 2021
Last modified: August 20, 2026

---

# do_action( ‘deleted_theme’, string $stylesheet, bool $deleted )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#wp--skip-link--target)

Fires immediately after a theme deletion attempt.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#parameters)󠁿

 `$stylesheet`string

Stylesheet of the theme to delete.

`$deleted`bool

Whether the theme deletion was successful.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#source)󠁿

    ```php
    do_action( 'deleted_theme', $stylesheet, $deleted );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/theme.php#L98)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/theme.php#L98-L98)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#related)󠁿

| Used by | Description | 
| [delete_theme()](https://developer.wordpress.org/reference/functions/delete_theme/)`wp-admin/includes/theme.php` |

Removes a theme.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/deleted_theme/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.8.0](https://developer.wordpress.org/reference/since/5.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdeleted_theme%2F)
before being able to contribute a note or feedback.