Returns the current environment to a snapshot captured with avr snapshot. Changes made inside Linux since that snapshot are lost. Your project files are shared, not part of the snapshot, and not touched.
This is exactly what avr help restore or avr restore --help prints.
Usage:
avr [selector flags] restore <name>
Restore the selected environment from a named snapshot. Snapshots are available only in environments whose backend supports them.
Selector flags such as --arch and --distro must come before the command; run `avr --help` to see them.
avr snapshot # see which snapshots exist
avr restore before-upgrade # go back to one
avr --arch amd64 restore clean # restore the amd64 environment
avr restore acts on the environment the selector flags and .avr.toml
resolve to, and restores it to the named snapshot. It does not ask for
confirmation.
It prints Restoring <environment> to snapshot "<name>"… on standard error
while it works, and Restored <environment> to snapshot "<name>". when done.
| Status | When |
|---|---|
0 |
Restored |
1 |
No snapshot has that name, the environment cannot be snapshotted, or the backend failed |
2 |
No name, more than one argument, or an unsupported environment |
avr: snapshot does not exist: <details>
Available snapshots for <environment>: <names>
When there are none at all, the message says so instead of listing them. Exit status 1.
avr: `avr restore` needs the name of a snapshot to restore; run `avr snapshot` to see the ones available for this environment
Exit status 2.
On macOS, a native-architecture environment refuses with the same message as avr snapshot. Exit status 1.