module:remove command tears down every place the module was wired into the project: it unregisters the module from AppModule and SharedModule, removes its path alias from the root tsconfig.json, then deletes the modules/<name>/ directory. Nothing is left dangling, no stale registrations and no orphan aliases.
This is the mirror of module:create: whatever creation wired up, removal unwinds.
CLI command
Run the generator and it walks you through the removal. With no flags it prompts for the module name, then asks you to confirm before anything is deleted.What gets unregistered
When you remove a module, the command unwinds every registration thatmodule:create set up:
Because the registrations are removed before the directory is deleted, the project is left in a consistent state, with no references to a module that no longer exists.
Use with Claude and Codex
The generator ships a matchingmodule:remove skill. It runs the command and confirms the removal with you before deleting anything. Initialize the skills once for your agent:
- Claude
- Codex
Prompt
module:remove --name=billing, unregistering the module and deleting its directory after you confirm.
Related
- Module overview: how modules are structured and registered.
- Create: scaffold a new module, the mirror of this command.
- module:remove: the full command reference.