Code navigation in IntelliJ IDEA on the Linux desktop relies on an index of the project's files and dependencies. If a declaration you know exists still fails to open after project analysis finishes, invalidating the IDE caches lets IntelliJ IDEA build a fresh index.
IntelliJ IDEA clears caches for every project opened in the current IDE version. It rebuilds the caches as you reopen those projects, so code navigation and completion may be slow or temporarily unavailable while project analysis runs.
Local History keeps recent edits that can be useful when you need to recover a change. The Clear file system cache and Local History option removes that history along with the file system cache. A basic reset uses the dialog's default options with every checkbox clear.
For a Java project, a missing JDK can leave symbols unresolved even after project analysis.
Related: How to install JDK on Ubuntu
Steps to invalidate caches in a JetBrains IDE:
Start with your trusted project open in IntelliJ IDEA, your edits saved, and the unresolved reference or failed navigation target visible in the editor. The Java example uses the titleFor call in CatalogApp.java in ~/IdeaProjects/catalog. IntelliJ IDEA shows the main menu under the Main Menu button in the window header.
If Trust and Open Project appears while opening your project, check the project name and trust it only if you trust its source. Trust Project can allow project code to run. If the editor opens on Air or shows a Junie offer, you can open the call site from the Project tool window without accepting the offer. Continue at step 1 once the call site is open.
- Open the File menu from the Main Menu button in the window header.

- Select Invalidate Caches… from the File menu.

- Click Invalidate and Restart with all optional checkboxes clear.

- Wait for the Analyzing project… progress indicator to disappear from the status bar after the IDE restarts.

- Place the caret on the same reference that previously failed to open its declaration.

- Press Ctrl+B to navigate to the declaration.

- Verify that the editor lands on the expected declaration.
In the example, the editor opens
Catalog.javaat thetitleFormethod. If the editor stays at the call site, the navigation problem persists.