Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.6 Update released for Drupal core (11.4.6)! Release: Drupal 10.6.16 Update released for Drupal core (10.6.16)! Release: Drupal 12.0.0-alpha1 First alpha version released for Drupal core (12.0.0-alpha1). Release: AI (Artificial Intelligence) 1.5.0-rc3 New release candidate for module ai (1.5.0-rc3). Release: Smart Image Optimizer 1.0.1 Minor update available for module smart_image_optimizer (1.0.1). Release: EzContent API - Enhanced De-coupled CMS Experience 2.3.10 Minor update available for module ezcontent_api (2.3.10). Release: Collector Systems Gallery 1.0.11 Minor update available for module collector_systems (1.0.11). Release: EzContent API - Enhanced De-coupled CMS Experience 2.1.4 Minor update available for module ezcontent_api (2.1.4). Module Revived: EzContent API - Enhanced De-coupled CMS Experience 2.3.9 Module ezcontent_api updated after 15 months of inactivity (2.3.9). Security Coverage: Analyze PostHog Module analyze_posthog now has official Drupal security advisory coverage.

File Inspector

244 sites Security covered Drupal 11 · not 10
View on drupal.org

This module helps clean up your Drupal site by finding files on your server that are no longer connected to any content. It provides a report where you can review, safely delete these orphaned files, or import them into the Media library.

File Inspector finds the files your site forgot about. It scans your file system and identifies unmanaged files, files that exist on disk but are not referenced by any Drupal entity (no record in file_managed), then lets administrators review, delete, or import them into the Media library from a single report screen.

Over time, a Drupal site accumulates orphaned files: leftovers from deleted content, manual uploads, migrations, and third-party tooling. File Inspector gives you a clear, actionable inventory of what is actually on disk versus what Drupal knows about, and the tools to clean it up safely.

Key features

  • Orphaned file detection: classifies every discovered file as managed or unmanaged by checking it against Drupal's managed-file table.
  • Built for scale: uses generator-based iteration and the Batch API to handle large file systems (100k+ files) without exhausting memory.
  • Actionable report: a Views-based report with status, MIME-type, and date filters, per-row actions, and bulk operations.
  • Import into Media: turn an unmanaged file into a managed File + Media entity in one click (requires the core Media module).
  • Safe deletion: permanently remove orphaned files through confirmation forms, with path validation and permission gating.
  • Imported-media tracking: the report links each imported row directly to the Media item it produced, so every import is traceable.
  • Embedded web folder support: declare folders that hold embedded web apps (flipbooks, microsites). File Inspector records only their entry file and ignores the supporting assets, keeping them out of your deletion candidates.

How it works

Inspection runs in two phases. First, File Inspector walks the configured stream wrapper(s) and records every file it finds. Then it classifies each record as managed or unmanaged by checking it against file_managed. Results are stored in a dedicated table (not entities) for fast, scalable querying and full Views integration.

Requirements

  • Drupal core 11
  • Views (core)
  • Media (core) — optional

Depends on

Dependencies of the latest stable release

  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.0 Stable 11 Jun 23, 2026
1.0.0-beta1 Pre-release 11 Jun 9, 2026
1.x-dev Dev 11 Jun 5, 2026