Okay, you want to remove a project from IntelliJ's list of recent projects or from the "known" projects, but keep all your source code and files on your computer.
The key is to remove the project from the recent/managed projects list within IntelliJ, rather than using a "Delete" function that might also prompt you to delete files from disk.
Here are the common ways to do this:
Method 1: From the Welcome Screen (Most Common)
This is the easiest way if you don't have the project currently open or if you see it in the "Recent Projects" list when you first open IntelliJ.
-
Close any open projects (File > Close Project). This will take you back to the Welcome screen.
-
On the Welcome screen, look at the list of "Recent Projects".
-
Hover your mouse over the project you want to remove.
-
An "X" icon should appear next to the project name (or an ellipsis ... followed by options).
-
Click the "X" or the options icon.
-
From the context menu that appears, select "Remove from Recent Projects".
- IMPORTANT: DO NOT select "Delete" or "Move to Trash/Recycle Bin" if that option is presented. That option will delete your files.
Method 2: From the File Menu (When Another Project is Open)
If you have another project open and want to remove a different project from the list:
-
Go to File > Open Recent.
-
Select Manage Projects....
-
A list of recent projects will appear in a dialog.
-
Select the project you want to remove from the list.
-
Click the minus (-) button or the "Remove from Recent Projects" button (the exact UI might vary slightly depending on your IntelliJ version).
- Again, make sure you choose the option that only removes it from the list, not one that suggests deleting files.
What These Methods Do:
Both methods primarily remove the entry for that project from IntelliJ's internal list of recent/managed projects. They do not delete the project directory or any files within it from your file system.
Alternative (Less Recommended for this specific goal): Manually Delete the .idea Folder
You could also manually go to the project's directory on your file system and delete the .idea folder. This folder contains all of IntelliJ's project-specific configuration (modules, SDKs, run configurations, UI settings, etc.).
- Pros: Completely removes IntelliJ's configuration from the project itself.
- Cons: The project might still appear in IntelliJ's "Recent Projects" list (though it might show as "missing" or broken). This doesn't achieve the goal of cleanly removing it from the list as effectively as the methods above. You'd likely still need to use Method 1 or 2 to clean up the recent list entry.
In Summary:
Use Method 1 (Welcome Screen) or Method 2 (Manage Projects) and always choose the option "Remove from Recent Projects" (or similar wording focused on the list), not any option that uses the word "Delete". Your project files will remain safe on your disk.