# Tree Shaking

say it: **“TREE SHAY-king”** **/triː ˈʃeɪkɪŋ/**

Removing unused code from the final build.

## What is **Tree Shaking**?

**Tree shaking** removes code your app never uses from the final build, like shaking dead leaves off a tree. Services with `providedIn: 'root'` can be removed if nothing injects them.

Level: Master · [More Angular terms at this level](https://www.ask-codey.com/glossary?category=angular&level=5)

Updated: November 17, 2026

## In other subjects

- [Tree Shaking in JavaScript](https://www.ask-codey.com/glossary/tree-shaking)

Source: https://www.ask-codey.com/glossary/tree-shaking-angular
