php/commands/src/CLI_Cache_Command.php
public function cache_prune() {
		$cache = WP_CLI::get_cache();

		if ( ! $cache->is_enabled() ) {
			WP_CLI::error( 'Cache directory does not exist.' );
		}

		$cache->prune();

		WP_CLI::success( 'Cache pruned.' );
	}
public function cache_prune() {
		$cache = WP_CLI::get_cache();

		if ( ! $cache->is_enabled() ) {
			WP_CLI::error( 'Cache directory does not exist.' );
		}

		$cache->prune();

		WP_CLI::success( 'Cache pruned.' );
	}
public function cache_prune ( ) { $ cache = WP_CLI :: get_cache ( ) ; if ( ! $ cache -> is_enabled ( ) ) { WP_CLI :: error ( 'Cache directory does not exist.' ) ; } $ cache -> prune ( ) ; WP_CLI :: success ( 'Cache pruned.' ) ; }
Prune the internal cache.

Removes all cached files except for the newest version of each one.

## EXAMPLES

$ wp cli cache prune
Success: Cache pruned.

@subcommand prune
Prune the internal cache .