Remove Unused Themes and Plugins

Remove all inactive themes and plugins with a single click. Clean up your WordPress installation, free disk space, and reduce potential security vulnerabilities from unused code.

Use Cases

  • Clean up after testing multiple themes or plugins
  • Reduce security attack surface by removing unused code
  • Free up disk space on your hosting
  • Simplify your WordPress admin for better focus

Why Remove Unused Themes and Plugins?

Security

Inactive plugins and themes can still be exploited:

  • Vulnerabilities don’t require activation
  • Attackers can directly access plugin files
  • Outdated code is more likely to have known exploits

Performance

While inactive items don’t run code, they:

  • Take up disk space
  • Clutter your admin interface
  • May appear in backup files unnecessarily

Maintenance

Fewer items means:

  • Less to update
  • Cleaner admin screens
  • Easier troubleshooting

How It Works

  1. Enable the module in Switchboard
  2. Open the module settings panel
  3. Click “Scan for Inactive Items”
  4. Review the lists of inactive themes and plugins
  5. Click remove button(s) to delete

The Scanning Process

When you click “Scan for Inactive Items”, the module:

  1. Gets list of all installed plugins
  2. Compares against active plugins
  3. Gets list of all installed themes
  4. Identifies current theme (and parent if child theme)
  5. Displays inactive items with version and author info

What Gets Detected

Inactive Plugins

Any plugin that is:

  • Installed in /wp-content/plugins/
  • Not currently active
  • Not network-active (if multisite)

Inactive Themes

Any theme that is:

  • Installed in /wp-content/themes/
  • Not the current active theme
  • Not the parent theme of the active child theme

Parent themes of active child themes are always protected. You can’t accidentally delete a theme that’s required by your active child theme.

Removal Options

Remove All Inactive Items

Deletes all inactive plugins AND themes at once.

Remove All Inactive Plugins

Deletes only inactive plugins, keeps themes.

Remove All Inactive Themes

Deletes only inactive themes, keeps plugins.

Confirmation Process

Before any deletion:

  1. ⚠️ Warning dialog appears
  2. Shows exactly how many items will be deleted
  3. Requires explicit confirmation click
  4. Cannot be undone - make backups first!

What Deletion Does

For each item:

  1. Uses WordPress’s built-in delete_plugins() or delete_theme()
  2. Removes all files and folders
  3. Does NOT affect database settings (those remain orphaned)
  4. Cannot be undone without reinstalling

Results Display

After removal completes, you’ll see:

  • Total items successfully deleted
  • Any items that failed to delete
  • Specific error messages for failures
  • Updated scan to verify cleanup

Common Failure Reasons

ErrorCauseSolution
Permission deniedFile ownership issuesFix via FTP or contact host
Directory not emptyLocked filesTry again or delete manually
Delete failedVarious PHP issuesCheck error logs

Best Practices

Before Removing

  1. Create a full backup - You cannot undo deletions
  2. Review the list - Make sure nothing important is inactive
  3. Document what you remove - In case you need to reinstall

What to Keep Inactive

Consider keeping these inactive:

  • A default WordPress theme (like Twenty Twenty-Four) as fallback
  • Plugins you use seasonally
  • Premium plugins with licenses (easier to reactivate than reinstall)

Multisite Considerations

On multisite networks:

  • Network-active plugins are not shown as inactive
  • Per-site active plugins are protected
  • Only items inactive across ALL sites are flagged

After Cleanup

Once you’ve removed unused items:

  1. Verify your site still works correctly
  2. Clear any caching plugins
  3. Consider running a database cleanup too
  4. Check your backup to ensure it captures new state

FAQ

Can I recover deleted themes or plugins?No. Deletion is permanent. You would need to reinstall from WordPress.org, the developer’s website, or restore from a backup. Always backup before using this feature.
Will this remove plugin settings from the database?No. This only deletes files. Database entries (settings, options, custom tables) remain. To clean those up, you’d need a database cleanup tool or plugin.
Why can’t I delete the default WordPress theme?You can! The module doesn’t protect WordPress default themes. However, it’s recommended to keep at least one default theme as a fallback in case your current theme fails.
Is this safe to use on a live site?Yes, but always backup first. The module only removes inactive items, so your live site functionality isn’t affected. However, if you need a plugin for a specific task (like scheduled events), ensure it’s active before cleaning up.
What about premium plugins with licenses?Deleting a premium plugin doesn’t remove your license. However, reinstalling may require your license key. Keep license information accessible before removing premium items.
PRO

Get access to all 147 modules with a single license

Upgrade to Pro