cmd reset - nself-org/cli GitHub Wiki

nself reset

Stop containers and remove generated configuration files.

Synopsis

nself reset [flags]

Description

nself reset stops running containers and removes all files generated by nself build: docker-compose.yml, nginx site configs, SSL certificate files, and .env.computed. Your .env and all .env.* variant files are preserved, as are your data/ and volumes/ directories.

After nself reset, run nself build to regenerate configuration and nself start to restart the stack. This is the recommended way to apply a fresh build after making significant configuration changes.

Hard reset (--hard --confirm) goes further and also removes .env itself. This is a complete project teardown, use it only when you intend to run nself init again from scratch.

Flags

Flag Default Description
--hard false Also remove .env (requires --confirm)
--confirm false Confirm destructive --hard reset
--no-monorepo false Disable automatic monorepo backend detection
--help, -h Show help

What is Removed vs Preserved

Item Standard Reset Hard Reset
docker-compose.yml Removed Removed
nginx/sites/ configs Removed Removed
ssl/ certificate files Removed Removed
.env.computed Removed Removed
.env and .env.* Preserved Removed
data/ and volumes/ Preserved Preserved

Examples

# Standard reset — remove generated files, keep .env and data
nself reset

# Hard reset — remove everything including .env (requires --confirm)
nself reset --hard --confirm

# After reset, rebuild and restart
nself build && nself start

← [Commands]] ](/nself-org/cli/wiki/[[Home) →