# snapdir checkout Check out a snapshot to a directory. `checkout` materializes a snapshot that is already in the local cache into a destination directory. If the snapshot is not yet cached, fetch it first with [`snapdir fetch`](snapdir-fetch.md) or use [`snapdir pull`](snapdir-pull.md). ## Usage ```text snapdir checkout [OPTIONS] [DIR] ``` ### Arguments | Argument | Description | | --- | --- | | `[DIR]` | Destination directory. | ### Options `checkout` accepts the [global options](overview.md#global-options); the most relevant are `--id` (snapshot to check out), `--cache-dir`, `--linked` (symlink into the cache instead of copying), and `--force`. ## Examples Check out a cached snapshot into a directory: ```console snapdir checkout --id 1220abc... ./restored ``` Check out using symlinks into the cache, overwriting an existing directory: ```console snapdir checkout --id 1220abc... --linked --force ./restored ``` ## See also - [`snapdir fetch`](snapdir-fetch.md) — download a snapshot into the cache first - [`snapdir pull`](snapdir-pull.md) — fetch and check out in one step - [`snapdir stage`](snapdir-stage.md) — record a directory into the cache