duplicates remove
Delete Duplicate Copies Directly
Deletes the redundant copies of a duplicate group FileFortress itself identified — no exported script, no external tool. Every run previews a dry-run plan first, only touches hash-verified same-remote copies unless you explicitly opt out of those defaults, and prefers each provider's trash/recycle bin over permanent deletion.
Syntax
filefortress duplicates remove [options]
duplicates remove shares its keep-strategy options with
find duplicates — it deletes the same plan that command
would show you, not a separately-derived one. Run find duplicates
first if you just want to look, without any risk of deleting anything.
Options
| Option | Description | Default |
|---|---|---|
--keep-strategy |
Which copy to keep in each group: oldest, newest, first, smallest, largest, or by-remote. |
oldest |
--keep-remote |
Required with --keep-strategy by-remote — names the remote whose copy always survives. |
— |
--dry-run |
Print the plan — files that would be deleted, keeper per group, space to reclaim — without deleting anything. | On |
--confirm |
Execute the deletion. Required in --non-interactive mode — without it (and without --dry-run), the command fails with a clear message instead of guessing your intent. |
Off |
--across-remotes |
Also delete copies that live on a different remote than the keeper. Off by default because the same file on two clouds is often deliberate redundancy, not waste. | Off |
--include-name-size-matches |
Also delete groups matched by name and size alone, not a content hash. Off by default — two different files can share a name and byte count. | Off |
--permanent |
Skip the provider's trash/recycle bin where one exists and delete immediately. Off by default — trash is preferred wherever a provider offers it. | Off |
--non-interactive |
Run in script mode — no prompts. Combine with --confirm or --dry-run. |
Off |
What Makes This Safe
These guardrails apply identically whether you run this from the CLI, the interactive prompt, or the Remove duplicates button on the desktop GUI's Duplicates page — there is exactly one implementation of this logic, shared by every surface.
Scoped to what FileFortress found. There is no way to pass an arbitrary path — every deletion consumes a duplicate-group plan.
The last copy of a group is never deleted. The keeper is verified to still exist immediately before its siblings are removed; if it has vanished, the whole group is skipped.
Hash-verified and same-remote by default. Both landmines — name/size matches that merely look identical, and cross-cloud "duplicates" that are really your own backups — require an explicit opt-in to touch.
The preview is the truth. The dry-run plan is computed with the exact same guardrails as a real run, so what you see is what would actually be deleted — not a rougher, pre-filter estimate.
Failures are isolated and reported. If one file's deletion fails, the rest of the run continues; the summary lists exactly what succeeded, what failed, and why.
Recoverability by Provider
Whether a deleted file can be recovered — and for how long — depends entirely on the provider, not on FileFortress:
| Provider | Default action | Recoverable? |
|---|---|---|
| Google Drive | Moved to Drive Trash | Yes, ~30 days (--permanent skips this) |
| OneDrive | Moved to recycle bin | Yes, ~30 days |
| AWS S3 | Object deleted | Only if bucket versioning is enabled |
| Backblaze B2 | Object deleted | Depends on your bucket's lifecycle/versioning rules |
| Local storage | File deleted from disk | No — not routed through your OS recycle bin |
Google Drive needs a write-capable connection
The default, one-click Google Drive connection only requests read access — enough to scan and download, but not enough to trash or delete a file. To remove Google Drive duplicates natively, connect that remote through Bring-Your-Own OAuth with a write-enabled scope. Otherwise, export a cleanup plan instead — see the Removing Duplicates guide.
Examples
Preview what would be deleted (default — deletes nothing):
filefortress duplicates remove --keep-strategy oldest
Review the plan, then execute it interactively:
filefortress duplicates remove
Prints the plan, then asks for a final y/N confirmation before deleting anything.
Execute non-interactively (scripts, cron):
filefortress duplicates remove --non-interactive --keep-strategy oldest --confirm
Consolidate onto one remote, including cross-cloud copies:
filefortress duplicates remove --keep-strategy by-remote --keep-remote "My Drive" --across-remotes --confirm
Only reach for --across-remotes once you have confirmed those cross-cloud copies really are redundant, not a deliberate backup.
Prefer the desktop app?
Open the desktop GUI (filefortress --gui or double-click the app), go to the Duplicates page, and click Remove Duplicates. The same dry-run plan renders inside the confirmation modal before anything is deleted.