The resources in your app are removed based on the
removal setting in your sst.config.ts.How it works
When you runsst remove, it will:
- Read your
sst.config.tsto identify all resources - Remove resources based on their
removalpolicy - Clean up the stage-specific state
removal: "retain" will not be deleted and will remain in your AWS account.
Options
--target
Only run it for the given component.
sst.config.ts.
Examples
Remove your personal stage
Remove the default personal stage:Remove a specific stage
Remove your app from a specific stage:Remove a specific component
Remove only a specific component:Important notes
State and bootstrap resources
Thesst remove command does not remove:
- SST state resources (S3 bucket for state storage)
- Bootstrap resources (IAM roles, etc.)
Removal policies
Resources respect their configuredremoval policy:
removal: "remove"- Resource will be deletedremoval: "retain"- Resource will be kept in your accountremoval: "retain-all"- All resources will be kept
sst remove on production stages.
Related
sst deploy- Deploy your applicationsst refresh- Refresh your app state- State documentation - Learn more about SST state