---
title: "List Snapshots"
description: "Documentation for List Snapshots Command in ZeyOS SDK CLI"
canonical_url: "https://www.zeyos.com/sdk/snapshot-management/zeysdk-snapshot-list"
markdown_url: "https://www.zeyos.com/ai/guide/sdk/snapshot-management/zeysdk-snapshot-list.md"
section: "sdk"
authority: "guide"
language: "en"
source_repository: "zeyos/sdk-v2"
source_path: "docs/snapshot-management/zeysdk-snapshot-list.md"
source_revision: "a99897af74253b4dc5af6fecb9301cea0ae18e27"
---

# List Snapshots

The `snapshot list` command displays existing snapshots and supports interactive snapshot management.

```bash
zeysdk snapshot list
```

**Features**

| Feature | Description |
|---------|-------------|
| List | View all snapshots with comments and dates |
| Restore | Revert to a selected snapshot |
| Delete | Remove selected snapshot |
| Details | View snapshot metadata |

**Process**

1. **Metadata Loading**
   - Reads local snapshot metadata
   - Exits when no snapshots are available
   - Formats snapshot rows for interactive display

2. **Snapshot Selection**
   - Displays snapshot ID, comment, and date
   - Uses configured list height when available
   - Prompts you to select a snapshot

3. **Action Selection**
   - Shows details for the selected snapshot
   - Offers restore or delete actions
   - Confirms deletion before removing a snapshot
   - Press Escape in a restore/delete confirmation to return to snapshot actions without making changes
   - Press Escape in snapshot actions to return to the snapshot list, or in the list to exit
   - Declining deletion returns to snapshot actions, with Delete still selected
   - Returning to either menu preserves its selected row

**Display Format**

| Column | Description |
|--------|-------------|
| ID | Snapshot identifier (`YYYYMMDD-HHMMSS`, optionally with a collision suffix) |
| Comment | User-provided description |
| Date | Creation timestamp |

**Examples**

```bash
zeysdk snapshot list
```

**Error Handling**

| Error | Description | Resolution |
|-------|-------------|------------|
| No snapshots | Snapshot metadata is empty | Create a snapshot first |
| Metadata error | Snapshot metadata cannot be read | Check snapshot metadata file |
| Restore failed | Selected restore action failed | Check snapshot archive and permissions |
| Delete failed | Selected delete action failed | Check file permissions |

**Notes**

- Snapshot IDs are displayed without the `.zip` suffix
- Missing or invalid comments and dates display as `No comment` and `No date`
- The list is driven by `.zeysdk/snapshots/snapshots.json`; an orphan ZIP without metadata is not displayed
- The interactive list supports restore and delete actions
- Delete actions ask for confirmation before removing the archive
- Restore actions use the current working directory as the restore target

**Best Practices**

- Review comments before restoring a snapshot
- Keep comments specific enough to identify the project state
- Delete old snapshots that are no longer useful
- Keep at least one known-good snapshot before risky local changes
