public function delete( $args, $assoc_args = array() ) {
		$all = Utils\get_flag_value( $assoc_args, 'all', false );

		// Check if plugin names of --all is passed.
		$args = $this->check_optional_args_and_all( $args, $all, 'delete' );
		if ( ! $args ) {
			return;
		}

		$successes = 0;
		$errors    = 0;

		foreach ( $this->fetcher->get_many( $args ) as $plugin ) {
			if ( $this->delete_plugin( $plugin ) ) {
				WP_CLI::log( "Deleted '{$plugin->name}' plugin." );
				$successes++;
			} else {
				$errors++;
			}
		}
		if ( ! $this->chained_command ) {
			Utils\report_batch_operation_results( 'plugin', 'delete', count( $args ), $successes, $errors );
		}
	}
public function delete( $args, $assoc_args = array() ) {
		$all = Utils\get_flag_value( $assoc_args, 'all', false );

		// Check if plugin names of --all is passed.
		$args = $this->check_optional_args_and_all( $args, $all, 'delete' );
		if ( ! $args ) {
			return;
		}

		$successes = 0;
		$errors    = 0;

		foreach ( $this->fetcher->get_many( $args ) as $plugin ) {
			if ( $this->delete_plugin( $plugin ) ) {
				WP_CLI::log( "Deleted '{$plugin->name}' plugin." );
				$successes++;
			} else {
				$errors++;
			}
		}
		if ( ! $this->chained_command ) {
			Utils\report_batch_operation_results( 'plugin', 'delete', count( $args ), $successes, $errors );
		}
	}
public function delete ( $ args , $ assoc_args = array ( ) ) { $ all = Utils \ get_flag_value ( $ assoc_args , 'all' , false ) ; // Check if plugin names of --all is passed. $ args = $ this -> check_optional_args_and_all ( $ args , $ all , 'delete' ) ; if ( ! $ args ) { return ; } $ successes = 0 ; $ errors = 0 ; foreach ( $ this -> fetcher -> get_many ( $ args ) as $ plugin ) { if ( $ this -> delete_plugin ( $ plugin ) ) { WP_CLI :: log ( "Deleted '{$plugin->name}' plugin." ) ; $ successes ++ ; } else { $ errors ++ ; } } if ( ! $ this -> chained_command ) { Utils \ report_batch_operation_results ( 'plugin' , 'delete' , count ( $ args ) , $ successes , $ errors ) ; } }
Deletes plugin files without deactivating or uninstalling.

## OPTIONS

[<plugin>...]
: One or more plugins to delete.

[--all]
: If set, all plugins will be deleted.

## EXAMPLES

# Delete plugin
$ wp plugin delete hello
Deleted 'hello' plugin.
Success: Deleted 1 of 1 plugins.

# Delete inactive plugins
$ wp plugin delete $(wp plugin list --status=inactive --field=name)
Deleted 'tinymce-templates' plugin.
Success: Deleted 1 of 1 plugins.
Deletes plugin files without deactivating or uninstalling .