# Excludes

> **TL;DR**
> Windows and Linux: `File | Settings | Build, Execution, Deployment | Compiler | Excludes`
>
>
>
> macOS: `IntelliJ IDEA | Preferences | Build, Execution, Deployment | Compiler | Excludes`
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) or ![the Settings button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.settings.svg)

Use this page to specify files and directories within your project that should not be passed to the compiler.

| Item | Keyboard Shortcut | Description |
| --- | --- | --- |
| Path |  | In this field, the path to a file or directory to be excluded from compilation is shown. |
| Recursively |  | For a directory: select this option to exclude from compilation all the corresponding subdirectories. |
| ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) | `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)) | Use this icon or shortcut to add a file or directory to the list. Select the file or directory in the dialog that opens. |
| ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.remove.svg) | `Alt+Delete` (Windows), `⌘ ⌦` (macOS), `⌘ ⌦` (IntelliJ IDEA Classic (macOS)), `⌘ ⌦` (macOS System Shortcuts), `Alt+Delete` (XWin), `Alt+Delete` (GNOME), `Alt+Delete` (KDE), `Alt+Delete` (Emacs), `Alt+Delete` (Sublime Text), `⌘ ⌦` (Sublime Text (macOS)), `Alt+Delete` (NetBeans), `Ctrl+R, D` (Visual Studio), `⌘ R, D` (Visual Studio (macOS)), `Alt+Delete` (Eclipse), `Alt+Delete` (Eclipse (macOS)) | Use this icon or shortcut to remove the selected item or items from the list. |

> **Note:**
> * The sources listed on this page, if they are used in the project parts to be compiled (for example, if they are imported, extended or implemented), will nevertheless be compiled.
>
> * Explicit compiler invocation on excluded directories will force their compilation.

