How to delete a component in Angular

The most current version as of .

  1. Inside ./src/app/app.module.ts:

    1. Remove the @import statement

    2. Remove the component variable from the @NgModule declarations array

  2. Remove the component directory from your ./src/app directory

  3. If there are any references to the component, also delete them

Tested with Angular version 13.1.1
— David Wolf