Skip to main content
Removing a module does more than delete a folder. The 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 and its scope from .commitlintrc.ts, then deletes the modules/<name>/ directory. The result is a clean removal with no dangling registrations or aliases left behind. 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.
# Interactive: prompts for the name, then asks you to confirm removal
ooneex module:remove

# Remove a module by name
ooneex module:remove --name=billing

# The name is normalized to kebab-case (Catalog → catalog)
ooneex module:remove --name=Catalog
OptionDescriptionDefault
--nameName of the module to remove (normalized to kebab-case).Prompted if omitted
Removal is destructive. It deletes the entire modules/<name>/ directory — controllers, services, tests, and everything else inside it. Commit your work or branch first so the change is recoverable. The core app and shared modules are protected and cannot be removed, and asking to remove a module that does not exist is reported as an error.

What gets unregistered

When you remove a module, the command unwinds every registration that module:create set up:
LocationWhat is removed
AppModule / SharedModuleThe module’s registration is unregistered so the app no longer loads it.
tsconfig.jsonThe module’s path alias is removed from compilerOptions.paths.
.commitlintrc.tsThe module’s scope is removed from the allowed commit scopes.
modules/<name>/The entire module directory is deleted from disk.
Because the registrations are removed before the directory is deleted, the project is left in a consistent state — there are no references to a module that no longer exists.

Use with Claude and Codex

The generator ships a matching module:remove skill. It runs the command and confirms the removal with you before deleting anything. Initialize the skills once for your agent:
ooneex claude:init
Then ask Claude in natural language — it maps the request to the generator and runs it:
Prompt
Remove the billing module from the project.
For example, the prompt above maps to module:remove --name=billing, unregistering the module and deleting its directory after you confirm.
  • Module overview — how modules are structured and registered.
  • Create — scaffold a new module, the mirror of this command.
  • module:remove — the full command reference.