Hi there @vectorspiral ,
There are plugins designed exactly for this, but there’s an important thing before you go through with a bulk delete.
Important note first: In WordPress, an image shows as “unattached” simply because it wasn’t uploaded while editing a specific post it doesn’t necessarily mean the image is unused. Images used in widgets, your site logo, theme Customizer settings, or page builders (Elementor, Divi, etc.) can still appear as “unattached” even though they’re actively displayed on your site. So don’t rely on “unattached” alone as your deletion criteria, you want a plugin that actually scans where images are used, not just their attachment status.
Steps:
- Back up your site first (files + database) before running any bulk deletion tool. This step is not optional — deleted media files cannot be recovered otherwise.
- Install and activate the Media Cleaner plugin from the official WordPress.org repository:
https://wordpress.org/plugins/media-cleaner/
It scans your posts, pages, and common page builders/theme settings for real usage (not just the “attached” flag), and moves anything it finds unused into an internal trash first so you can review before permanently deleting.
- Run a scan and carefully review the results list. Pay close attention to anything flagged that you recognize as a logo, favicon, or widget image and confirm it’s genuinely unused before deleting.
- Once you’re confident, delete the reviewed items from the plugin’s internal trash.
- If you have a large number of files (600+), consider running the scan during low-traffic hours, since scanning that much content can take some time on shared hosting.
Alternative option: If Media Cleaner doesn’t fit your setup, “Media Hygiene” is another actively maintained option on WordPress.org with deep folder scanning and bulk delete, worth comparing: https://wordpress.org/plugins/media-hygiene/
Let me know how the scan results go, happy to help!