Title: wp_clean_update_cache
Published: December 18, 2014
Last modified: August 20, 2026

---

# wp_clean_update_cache()

## In this article

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

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

Clears existing update caches for plugins, themes, and core.

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

    ```php
    function wp_clean_update_cache() {
    	if ( function_exists( 'wp_clean_plugins_cache' ) ) {
    		wp_clean_plugins_cache();
    	} else {
    		delete_site_transient( 'update_plugins' );
    	}

    	wp_clean_themes_cache();

    	delete_site_transient( 'update_core' );
    }
    ```

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

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

| Uses | Description | 
| [wp_clean_plugins_cache()](https://developer.wordpress.org/reference/functions/wp_clean_plugins_cache/)`wp-admin/includes/plugin.php` |

Clears the plugins cache used by [get_plugins()](https://developer.wordpress.org/reference/functions/get_plugins/) and by default, the plugin updates cache.

  | 
| [wp_clean_themes_cache()](https://developer.wordpress.org/reference/functions/wp_clean_themes_cache/)`wp-includes/theme.php` |

Clears the cache held by [get_theme_roots()](https://developer.wordpress.org/reference/functions/get_theme_roots/) and [WP_Theme](https://developer.wordpress.org/reference/classes/wp_theme/).

  | 
| [delete_site_transient()](https://developer.wordpress.org/reference/functions/delete_site_transient/)`wp-includes/option.php` |

Deletes a site transient.

  |

| Used by | Description | 
| [WP_Automatic_Updater::run()](https://developer.wordpress.org/reference/classes/wp_automatic_updater/run/)`wp-admin/includes/class-wp-automatic-updater.php` |

Kicks off the background update process, looping through all pending updates.

  | 
| [Language_Pack_Upgrader::bulk_upgrade()](https://developer.wordpress.org/reference/classes/language_pack_upgrader/bulk_upgrade/)`wp-admin/includes/class-language-pack-upgrader.php` |

Upgrades several language packs at once.

  |

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

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

## User Contributed Notes

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