Trashbin
When you delete a script, flow, app, schedule, variable, resource, or trigger in Windmill, the item is moved to the trashbin instead of being permanently removed. This gives you a safety window to restore accidentally deleted items.
The trashbin is accessible from Workspace settings > Trashbin and requires admin permissions.
Supported item types
All deletable workspace items go through the trashbin:
- Scripts (all versions and drafts are preserved)
- Flows (including versions and nodes)
- Apps (including full-code/raw apps)
- Schedules
- Variables and resources
- All trigger types (HTTP, WebSocket, Kafka, NATS, Postgres, MQTT, SQS, GCP, email)
How it works
When you delete an item through the UI or API, Windmill serializes the item's full data and stores it in the trashbin table, then removes it from the original table. The deletion is recorded with the user who performed it and a timestamp.
Restoring items
Click Restore on any trashbin entry to re-insert the item at its original path. Windmill restores all associated data (versions, drafts, linked resources). If an item already exists at the same path, the restore will fail to prevent accidental overwrites.
Permanent deletion
Click Delete on a specific entry or use Empty trashbin to permanently remove all trashed items. Both actions require confirmation.
Automatic expiration
Trashed items expire automatically after 3 days. Expired items are permanently deleted by a background process. This retention period is not configurable.
API
The trashbin API is available under /api/w/{workspace}/trash/:
| Endpoint | Method | Description |
|---|---|---|
/list | GET | List trashed items (filterable by item_kind, paginated) |
/get/{id} | GET | Get a trashed item with its full serialized data |
/restore/{id} | POST | Restore an item from the trashbin |
/delete/{id} | DELETE | Permanently delete a single item |
/empty | POST | Permanently delete all trashed items in the workspace |