Skip to content

cmd reset

github-actions[bot] edited this page Aug 26, 2026 · 4 revisions

nself reset

Stop containers and remove generated configuration files.

Synopsis

nself reset [flags]

Description

nself reset stops running containers, removes Docker volumes (database, storage, Redis — all project data), and removes 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 never touched by any mode of this command.

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.

--keep-data removes containers and generated files but leaves the database volumes in place, use it when you only need to regenerate config, not wipe data. --purge is the most destructive mode: it removes everything including database volumes. Neither mode touches your .env* files or source code.

What is Removed vs Preserved

Item Default --keep-data --purge
docker-compose.yml Removed Removed Removed
nginx/sites/ configs Removed Removed Removed
ssl/ certificate files Removed Removed Removed
.env.computed Removed Removed Removed
data/ and volumes/ Removed Preserved Removed
.env and .env.* Preserved Preserved Preserved

Flags

Flag Default Description
--keep-data false Remove containers and generated files but keep database volumes
--no-monorepo false Disable automatic monorepo backend detection
--purge false Remove everything including database volumes (DESTRUCTIVE)
--yes false Skip confirmation prompt (for CI/CD)
--help, -h Show help

Examples

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

# Regenerate config without touching the database
nself reset --keep-data

# Complete teardown — removes everything including data volumes (.env is still kept)
nself reset --purge

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

See Also

Commands | Home

Home


Getting Started


Commands


Features


Configuration


Plugins (87 + 10 monitoring)

Free (25)
Pro (62)
Planned (26)
  • plugin-audit
  • plugin-blog
  • plugin-checkout
  • plugin-commerce
  • plugin-drm
  • plugin-export
  • plugin-flow
  • plugin-import
  • plugin-ldap
  • plugin-mailgun
  • plugin-media
  • plugin-oauth-providers
  • plugin-pages
  • plugin-postmark
  • plugin-rate-limit
  • plugin-reports
  • plugin-saml
  • plugin-scheduler
  • plugin-sendgrid
  • plugin-sso
  • plugin-subscription
  • plugin-thumb
  • plugin-transcoder
  • plugin-twilio
  • plugin-waf
  • plugin-watermark

Guides


Architecture


Reference


Licensing


Security


Brand


Operations


Contributing


Admin


Changelog


All commands (52)

Clone this wiki locally