To remove unused symbols from standalone Angular components’ imports arrays, run ng generate @angular/core:cleanup-unused-imports from your Angular workspace. The schematic cleans these template-related imports across the project; it is not a general-purpose remover for every unused TypeScript import.
What Angular’s unused-import cleanup covers
Angular’s migration targets symbols listed in a component’s imports array that its template does not use. For example, if a standalone component imports an unused directive, the cleanup can remove both that directive from the TypeScript import declaration and its entry in the component’s imports array, while keeping symbols the component still needs.
As an Amazon Associate I earn from qualifying purchases.
Angular says it reports unused component imports as of version 19. The migration is documented separately as a project-wide cleanup schematic. Angular’s cleanup migration documentation describes its behavior and gives a before-and-after example.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Run the project-wide cleanup schematic
- Open a terminal at the Angular workspace root—the directory containing the project’s Angular CLI configuration.
- Run
ng generate @angular/core:cleanup-unused-imports. - Review the changed files with your usual source-control diff tools. Confirm that only imports not used by the relevant component templates were removed.
- Run the project’s normal checks, such as its existing build and test commands, before accepting the changes.
The official migration page documents the schematic, but does not report test results or quantified outcomes. Review the diff and verify the project using its own checks rather than assuming the migration guarantees a successful build.
#1 Best Overall
Notice unused imports while editing
Angular’s Language Service has editor support for unused standalone-import diagnostics and a code fix in its Angular 19 release history. That can help identify or fix an unused component import while working in the editor; the project-wide operation is the CLI schematic above. See the Angular Language Service changelog.
If diagnostics or code fixes behave unexpectedly, check which TypeScript package the editor is using. The Angular Language Service relies on Angular language-service and TypeScript packages, and its README warns that selecting a separate TypeScript package can create an API mismatch.
Rank #2
When you mean ordinary TypeScript imports
A component’s Angular imports array is not the same thing as every TypeScript import declaration in a project. The cleanup schematic is documented for component imports whose symbols are unused in templates; Angular’s migration documentation does not claim it removes all unused TypeScript imports. Treat ordinary TypeScript import cleanup as a separate task and use tooling appropriate to that scope.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




