> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrive.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Hosted remote MCP endpoint: https://api.zerodrive.dev/mcp (OAuth 2.0 PKCE or Bearer token).
> REST API base URL: https://api.zerodrive.dev with OpenAPI 3.1.0 specification at https://api.zerodrive.dev/openapi.json.
> S3-compatible gateway: https://api.zerodrive.dev/s3 (AWS Signature V4, region auto).
> Local command-line tool: zd (or zerodrive) and local stdio MCP server: zerodrive mcp.
> Token prefixes: zdk_ (Personal API Key), zdt_ (device session token), zda_ (OAuth access token), zdr_ (OAuth refresh token), zdx_ (temporary sandbox key). Never paste real keys into prompts or code.
> Be honest about platform boundaries: cloud files require internet access, files are encrypted at rest and in transit by Cloudflare rather than end-to-end encrypted, ZeroDrive is not a replacement for an independent backup, Windows 11 support is an unsigned x64 beta, and the 7-day Pro free trial requires a card and charges automatically when it ends.

# Duplicates, Move History & Trash

> Find exact duplicate files safely, undo moves, spot broken path links, and restore deleted files for 30 days.

Keep your drive clean without worrying about losing files. ZeroDrive checks contents byte for byte before touching duplicates and keeps easy ways to undo moves or deletes.

***

## Duplicate Protection (`#duplicates`)

1. **Safe read-only scan (`POST /v1/duplicates/scan`).** Never changes files during scanning. Skips empty files, files under 1 KiB, `.DS_Store`, `Thumbs.db`, `_SYSTEM`, Trash, and shortcuts. Files over 10 GiB appear under `not_compared`.
2. **Smart keep picks.** Recommends keeping one copy, favoring shared files first so links stay live, then regular folders over `_SORT` or `_ARCHIVE`, then the oldest file.
3. **One copy always stays.** Before moving extras to Trash, the server re-checks bytes on both files and skips anything changed since the scan.
4. **AI cannot wipe duplicates.** OAuth AI tools are blocked (`403`) on `/v1/duplicates/remove`. Confirm removals inside Studio, `#duplicates` on the web, or interactively via `zd duplicates --remove` (typing `REMOVE` or `DELETE`).

***

## Move history, undo move, and path links

When moving files via Studio, Web App, `zd mv`, API, or MCP:

* **Share links follow moves.** Active `/s/...` links stay working automatically.
* **Undo move (`undo_move`).** Sends items back where they came from and stops (`409`) if another file took that spot.
* **Finder & Explorer moves.** Moves done directly inside Finder or Explorer log in history as guessed desktop moves when seen within 10 minutes without re-pointing share links.
* **Find broken text links (`find_path_references`).** Quick read-only scan across `ROUTER.md`, `AGENTS.md`, `CONTEXT.md`, `README.md`, and text files for old path strings.

***

## 30-day Trash and file history

* Deleted files wait in **30-day Trash** by default (counting toward quota until restored or emptied).
* Turn on **Delete right away** in [app.zerodrive.dev](https://app.zerodrive.dev) settings if preferred. **File Version History** still protects prior edits for 30 days on Pro or 90 days on Pro Max and Agency.
* Restore deleted items anytime in Studio, `#trash` on the web, `restore_deleted_file`, or `POST /v1/trash/restore`.

***

## Next steps

> [card] [Space Lens & Free Disk Space](https://docs.zerodrive.dev/desktop/space-lens.md)
>
> Move cold folders off your laptop SSD safely.

> [card] [Sharing & Move-Proof Links](https://docs.zerodrive.dev/guides/sharing.md)
>
> Share files and keep links working across reorganizations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.