Permanently deletes soft-deleted media items that are older than a given age.
This task removes both the database records and the associated files from
storage for media items whose deleted_at timestamp is older than the
specified threshold.
Usage
$ mix phx_media_library.purge_deleted
By default, purges items soft-deleted more than 30 days ago.
Options
--days N Purge items deleted more than N days ago (default: 30)
--all Purge all soft-deleted items regardless of age
--dry-run Show what would be deleted without actually deleting
--yes Skip confirmation promptExamples
# Purge items deleted more than 30 days ago (default)
$ mix phx_media_library.purge_deleted
# Purge items deleted more than 7 days ago
$ mix phx_media_library.purge_deleted --days 7
# Purge ALL soft-deleted items
$ mix phx_media_library.purge_deleted --all
# Preview what would be deleted
$ mix phx_media_library.purge_deleted --dry-run