# Delete and version history

> Archive resources and restore earlier published versions.

Source: https://docs.generalinput.com/cli/resource/lifecycle



These commands work for workflows, apps and skills. They accept an id or resolve it from the resource directory's marker.

```sh
geni resource versions [id] --json
geni resource revert <versionId> [id]
geni resource delete [id]
```

`versions` lists published snapshots, newest first. Pass a returned snapshot id to `revert` to restore its bundle as live. App rollback also queues a rebuild; inspect it with [`geni app build-status`](/cli/resource/app/build-status).

Reverting leaves your local files unchanged. Pull the restored bundle into a fresh directory before editing again; an older checkout may be rejected when publishing.

`delete` archives an individual resource and requires ownership. For a workflow or app, `--version <n>` rejects deletion if its version has changed. Without the flag, the CLI fetches the current version immediately before deleting. Skill deletion uses its owner-only archive operation.

All three commands accept `--dir <path>` and `--json`.
