Soft delete and recovery
Downloads, versions, comments, and reviews use a two-stage delete. Soft delete hides the content but keeps it recoverable for a window. After the window, a daily cron permanently removes the rows.
Status values
Each kind of content has three possible states:
| Status | What it means |
|---|---|
| Visible | The content is live. |
| Moderated | Awaiting approval. Visible only to moderators and the author. |
| Deleted | Soft-deleted. Visible only to those with the relevant "View deleted" permission. |
A piece of content sits in exactly one state at a time.
Retention windows
| Content | Setting | Default |
|---|---|---|
| Downloads | Soft-deletion retention | 30 days |
| Comments | Soft-deleted comment retention | 30 days |
| Reviews | Shares the download retention | 30 days |
Use 0 to keep soft-deleted content indefinitely. The cron skips the prune in that case.
Recovery surfaces
Authors recovering their own downloads
Authors with Delete own downloads can also restore their own soft-deleted downloads:
- Visit the user's author page (
/downloads/authors/<username>.<id>/). - Switch to the Deleted tab. Only the author and moderators see this tab.
- Find the download. Click Restore.
- The download returns to visible. If the category requires approval, it returns to the moderation queue instead.
This recovery only works inside the retention window. Past the window, the daily cron has already hard-deleted the row.
Moderators
Moderators with View any deleted can see soft-deleted downloads from:
- The category listing (a "Show deleted" toggle when the permission is held).
- AdminCP > Moderate > Soft-deleted content.
- AdminCP > [MC] Downloads Manager > Categories > (category) > Downloads, with the deleted toggle.
Restore via the standard right-click "Undelete" action or via inline moderation.
Permanent delete
Authors with Permanently delete own can hard-delete their own downloads at any time, bypassing the retention window. The button is available next to Restore on the author page's Deleted tab.
Moderators with Hard-delete any can hard-delete any download.
What restoring does
- Sets the content to visible (or moderated if the category requires approval).
- Re-publishes any versions that were forced to unpublished at delete time. Versions that were already unpublished stay unpublished.
- Reattaches the linked discussion thread per the When a download is deleted setting. By default a closed thread stays closed; reopen it manually if needed.
- Writes a "Download restored" audit log entry.
What hard delete does
- Removes the download row.
- Removes child rows (versions, files, custom field values, comments, reviews).
- Removes file bytes from storage if no other download references the same hash.
- Writes a "Download hard-deleted" audit log entry.
- Does not delete the linked discussion thread. The thread is left intact (or in whatever state the When a download is deleted setting put it in).
Cron schedule
The daily cron picks up soft-deleted downloads, versions, files, and reviews past their retention. A separate daily cron handles comments. See advanced options for the cron entries.
Hash deduplication and hard delete
When Deduplicate uploads by SHA256 hash is on, two downloads can share the same underlying file bytes. Hard-deleting one does not remove the bytes if the other still references them. The reference count is tracked internally.
If you delete files manually from the storage backend (bypassing the add-on), you will see broken downloads. Always use the add-on's delete paths.