Skip to content

[6.x] Clean Asset Meta Command#13934

Open
jackmcdade wants to merge 1 commit into6.xfrom
clean-asset-meta-command
Open

[6.x] Clean Asset Meta Command#13934
jackmcdade wants to merge 1 commit into6.xfrom
clean-asset-meta-command

Conversation

@jackmcdade
Copy link
Member

@jackmcdade jackmcdade commented Feb 14, 2026

References statamic/ideas#89


Note

Medium Risk
Deletes files from asset container disks, so incorrect orphan detection or path handling could remove valid metadata; tests reduce but don’t eliminate that risk.

Overview
Adds a new statamic:assets:meta-clean console command to find and delete orphaned asset .meta/*.yaml files (optionally scoped to a single container) and to remove now-empty .meta directories afterward.

Includes a --dry-run mode to list what would be deleted without changing disks, registers the command in ConsoleServiceProvider, and adds coverage for deletion, preservation of valid metadata, container scoping, and root/nested .meta paths.

Written by Cursor Bugbot for commit 2ed54f0. This will update automatically on new commits. Configure here.

@jackmcdade jackmcdade marked this pull request as ready for review February 14, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant