# `mix ash_postgres.squash_snapshots`
[🔗](https://github.com/ash-project/ash_postgres/blob/v2.9.0/lib/mix/tasks/ash_postgres.squash_snapshots.ex#L5)

Cleans snapshots folder, leaving only one snapshot per resource.

## Examples

    mix ash_postgres.squash_snapshots
    mix ash_postgres.squash_snapshots --check --quiet
    mix ash_postgres.squash_snapshots --into zero
    mix ash_postgres.squash_snapshots --dry-run

## Command line options

* `--into` -
    `last`, `first` or `zero`. The default is `last`. Determines which name to use for
    a remaining snapshot. `last` keeps the name of the last snapshot, `first` renames it to the previously first,
    `zero` sets name with fourteen zeros.
* `--snapshot-path` - a custom path to stored snapshots. The default is "priv/resource_snapshots".
* `--quiet` - no messages will be printed.
* `--dry-run` - no files are touched, instead prints folders that have snapshots to squash.
* `--check` - no files are touched, instead returns an exit(1) code if there are snapshots to squash.

# `run`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
