Ora

How do I clear IntelliJ settings?

Published in IntelliJ Settings Management 4 mins read

To clear IntelliJ settings, the most common and recommended method is to use the built-in "Restore Default Settings" feature, which resets your preferences to their initial state. For a more comprehensive reset, you can manually delete the IDE's configuration and system directories.

How to Clear IntelliJ Settings

Clearing settings in IntelliJ IDEA can resolve various issues, from UI glitches to performance problems. There are two primary approaches: restoring defaults via the IDE or performing a complete manual reset.

1. Restore Default Settings within IntelliJ (Recommended)

This method is ideal for resolving most configuration-related issues without completely wiping all your custom data. It resets your IDE preferences, keymaps, and other user-specific settings to their initial, out-of-the-box state.

Using the Menu

The most straightforward way to restore default settings is through the IntelliJ menu:

  1. Go to File on the top menu bar.
  2. Navigate to Manage IDE Settings.
  3. Select Restore Default Settings.

Using Search Everywhere

Alternatively, you can quickly access this option using the "Search Everywhere" feature:

  1. Press Shift twice (double Shift).
  2. Type Restore default settings into the search bar.
  3. From the search results, click on Restore default settings.

What Happens Next

After selecting to restore, a confirmation dialog will appear. Click Restore and Restart. The IDE will then restart with the default configuration, ensuring all your custom settings are reverted to their initial values. This process is safe and usually resolves issues caused by corrupted or misconfigured preferences.

2. Manually Deleting Configuration and System Directories (Complete Reset)

For more persistent or severe issues, or if you want a truly fresh start, you might need to manually delete IntelliJ's configuration and system directories. This is a more drastic measure that removes all user-specific data, including plugins, caches, logs, and project history.

When to Use This Method

  • When Restore Default Settings doesn't resolve the issue.
  • After uninstalling and reinstalling IntelliJ and wanting a completely clean slate.
  • To free up disk space consumed by old caches and logs.
  • When troubleshooting deep-seated IDE corruption.

Important Note: Backup Your Settings

Before performing a manual deletion, consider backing up your current settings. You can do this by going to File | Manage IDE Settings | Export Settings.... This allows you to import them later if needed.

Locating Configuration and System Directories

IntelliJ IDEA stores user-specific files in two main directories:

  • Configuration directory: Contains user-specific settings, installed plugins, keymaps, themes, and more.
  • System directory: Stores caches, logs, local history, and temporary files generated by the IDE.

The exact paths vary depending on your operating system and IntelliJ IDEA version/edition (e.g., Ultimate or Community). You can find the specific paths for your version in the official JetBrains documentation: Directories Used by the IDE.

Here's a general guide for common operating systems (replace <version> with your specific IntelliJ version, e.g., 2023.3 and IdeaIC for Community Edition or IdeaIU for Ultimate Edition):

Operating System Configuration Directory (Config) System Directory (Cache & Logs)
Windows %APPDATA%\JetBrains\IdeaIC<version> (e.g., IdeaIC2023.3) %LOCALAPPDATA%\JetBrains\IdeaIC<version> (e.g., IdeaIC2023.3)
macOS ~/Library/Application Support/JetBrains/IdeaIC<version> ~/Library/Caches/JetBrains/IdeaIC<version>
Linux ~/.config/JetBrains/IdeaIC<version> ~/.cache/JetBrains/IdeaIC<version>

To manually clear:

  1. Completely close IntelliJ IDEA. Ensure no instances are running in the background.
  2. Navigate to the directories listed above using your file explorer.
  3. Delete (or rename for backup) both the config and system directories for your specific IntelliJ version. For example, on macOS, you might delete IdeaIC2023.3.
  4. Restart IntelliJ IDEA. It will launch as if it's the first time, prompting you through the initial setup wizard (import settings, accept terms, select UI theme, etc.).

Other Related Actions

While not strictly "clearing settings," these actions are often useful for resolving IDE issues.

Invalidate Caches / Restart

If you're experiencing problems with project indexing, code completion, or inexplicable errors, invalidating caches can often help without resetting your personal settings.

  1. Go to File | Invalidate Caches....
  2. In the dialog, you can choose to Clear file system cache and Local History and/or Invalidate and Restart. It's often recommended to select both and then click Invalidate and Restart.

Exporting and Importing Settings

If you frequently reinstall IntelliJ or work on multiple machines, you can manage your settings by exporting them to a .jar file and then importing them.

  • Export: Go to File | Manage IDE Settings | Export Settings....
  • Import: Go to File | Manage IDE Settings | Import Settings....

This allows you to transfer your preferred configuration, including keymaps, themes, and plugin settings, between different IntelliJ installations.