Trash, History & Rollback
On this page
Every change to a file is timestamped, and you can always roll back to an earlier point in time. This page covers the lightweight, per-entry mechanism for that: trash and per-file history. For the multi-file, atomic changeset-and-checkout system, see Version Control - that's a different, heavier tool for coordinating a whole set of changes together, not a replacement for this one.
Trash#
Deleting a file doesn't remove it immediately. It soft-deletes into a per-user trash, visible under the repository's Trash tab in the web dashboard (open the repository, then Trash in its tab strip). There is no cross-repository trash view - each repository's trash is its own.
You can delete from either place - your file manager (Finder, Explorer, or the command line, on the mounted drive) or the web dashboard. Both do the same thing: the file goes to trash, not away. Deleting a folder takes its contents with it. The dashboard does that in one step; your file manager removes the files inside one at a time and the folder last.
Restoring a folder brings back the folder and everything that was deleted with it in the same step. A folder deleted from your file manager went one file at a time, though, so when you restore it, the web dashboard lists the files that were deleted inside it just before it and asks whether to restore them too. It asks rather than restoring them automatically, because a file you deleted on purpose a moment earlier looks the same.
Retention is per-user, not just per-org: your own account setting, if you've set one, wins; otherwise it falls back to the org's default; otherwise a global 90-day default applies. Set your own under Settings → Account → Trash & history retention (1 to 3650 days), or clear it there to go back to the organization's window.
An org's default retention window is settable anywhere from 1 to 3650 days and controls how long a deleted file stays recoverable before it's permanently purged, for anyone in the org who hasn't set their own override. Until that window elapses, restoring a file from trash brings it back in place, at its original path. Retention windows are applied by a daily cleanup, so a change takes effect at the next daily pass rather than instantly.
From the CLI, swarmfile trash list shows your own soft-deleted entries, swarmfile trash restore <entry-id> brings one back (add --with-nearby to also bring back what was deleted inside a folder just before it), and swarmfile trash purge <entry-id> deletes it permanently - "Delete Forever," ahead of the retention window, not recoverable. --preview on purge reports how many descendants a folder would take with it before you commit to removing anything.
Because it can't be undone, purge asks for confirmation first; --yes skips the prompt (a non-interactive shell or --json needs it).
A very large folder restore or purge runs as a durable background job rather than an inline cascade: the command waits for it by default, and Ctrl-C or --no-wait detaches with exit 3, followed with swarmfile op status / op wait (long operations). op status shows the job's done/total progress while it runs, and in the dashboard the same operation shows progress on the row's own button - a restored folder reappears at once, with its contents filling in behind it.
Undo and redo in the Desktop App#
The Desktop App keeps a journal of the file operations you make on this computer, so you can take back a delete, rename, move or restore without going through Trash or history.
- Drive menu: click the drive name at the top of the app. It lists This device's recent operations, each with its own Undo, plus Undo last operation and Redo last operation.
- Operation journal: on the activity bar, Operation journal shows the full list, newest first, with each row's state and time; Load older operations pages further back. Each row offers Undo, or Redo once it has been undone.
A multi-select delete or move undoes as one. Deleting or moving several files at once from the app is recorded as one gesture (the row says one gesture of N items), and Undo or Redo on any of its rows acts on all of them. If some files can't be reversed, the app names them and why. The rest still go through, and undoing again retries only the ones that were refused. A new file you deleted before it finished uploading is gone for good, so it's named as not undone rather than failing the rest.
What undo will and won't do:
- It's this computer only. The journal is local: it doesn't show teammates' changes, or your own from another computer, and it never rewrites history.
- Nothing newer is overwritten. If a teammate changed a file after your operation, undoing it is refused, and so is undoing while a file still has local changes waiting to sync (try again once they've synced).
- Edits aren't in it. Changes to a file's contents go back through its history, not undo. Restoring a folder can't be undone from here; delete it again instead.
- Changes made in Finder or Explorer on the mounted drive appear in the journal but can't be undone from it; use Trash or the file's history.
- Old rows age out: the journal keeps 90 days and up to 2,000 operations per repository.
The same journal is available from a terminal as swarmfile undo and swarmfile redo.
History and rollback#
Because every change is timestamped, a file's full edit history is available at any time, and you can roll back to any point in that history - not just the most recent save. This is scoped to a single entry: rolling back a file doesn't touch anything else in the repository.
Every saved version vs. named commits#
New repositories start on Keep every saved version: each automatic save stays restorable, so any point in a file's history can be brought back - not just its named commits.
If you'd rather keep storage leaner - on a busy, high-save-volume repository, say - choose Named commits only when creating the repository, or switch later in the repository's settings (or with swarmfile repository set-keep-full-history false): individual save versions then expire after the retention window, and committed changesets are kept for that same window - tag one to keep it indefinitely (Keep every saved version keeps everything).
The setting is per repository, not per file; an org owner can change which choice new repositories start with under Settings → Organization (which applies only to repositories created afterwards).
When history is kept for less time#
On a repository set to Named commits only, a file's history is kept for your retention window, with one exception: if a repository's stored file information grows very large (millions of files and versions), Swarmfile automatically keeps history for less time - never below a minimum of 7 days by default - so the repository stays under its storage limit. It returns to the full window once the repository is comfortably below that point again.
Org owners and admins can see the window currently in force, and why, on the repository's Repository settings tab. See Repository storage limit.
Line attribution#
For a text file, open its History panel in the web dashboard (managed/plaintext) or the Desktop App (including end-to-end encrypted repositories) and switch to Line attribution.
Swarmfile reads the saved versions locally and shows which version and writer last introduced or replaced each line, including the agent/machine label when one is set. Lines copied into the target by a clean merge keep the source version's writer and age.
The view is read-only and separate from rollback; Synthetic hub-side versions (d1:) can be attributed but not restored locally, and history that starts mid-file is marked as truncated instead of guessing. The CLI equivalent is swarmfile blame --lines <path>.
Trash and history vs. version control#
Trash and history operate one entry at a time, with no concept of grouping changes across files. If you need to restore a whole folder or repository to how it looked before a coordinated set of changes - a batch of asset updates that need to move together, for example - that's what the changeset/checkout system in Version Control is for.
Something wrong or missing? Report a docs issue.