Skip to main content

wp theme delete

Overview

Remove theme files from wp-content/themes/. This is a permanent action — use it to clean up inactive, unused, or deprecated themes to reduce server clutter and potential security risks from outdated code.

What It Does

wp theme delete removes the theme's directory and all its files from the server. It will not allow you to delete the currently active theme.

Syntax

wp theme delete <slug>... [OPTIONS]
| --all

Options

FlagDescription
SLUG...One or more theme slugs to delete
--allDelete all themes EXCEPT the active one

Basic Usage

Delete a single theme

wp theme delete twentytwenty

Delete all unused themes (Hardening)

wp theme delete $(wp theme list --status=inactive --field=name)

Alternative using --all:

wp theme delete --all

Safety Notes

  • The active theme cannot be deleted. Use wp theme activate to switch first.
  • Deletions are permanent. No "Trash" for theme files.

Quick Reference

wp theme delete <slug>                 # Delete one
wp theme delete slug1 slug2 # Delete many
wp theme delete --all # Delete all except active

Next Steps