61

I only found how to delete projects in older versions of IDEA but still don't see the button in my IDEA 14. Did the Jetbrains guys implement this feature or do I still have to delete my project folders manually in file explorer?

Arthur Eirich
  • 3,368
  • 9
  • 31
  • 63

5 Answers5

77

1. Choose project, right click, in context menu, choose Show in Explorer (on Mac, select Reveal in Finder).

enter image description here

2. Choose menu File \ Close Project

enter image description here

3. In Windows Explorer, press Del or Shift+Del for permanent delete.

4. At IntelliJ IDEA startup windows, hover cursor on old project name (what has been deleted) press Del for delelte.

enter image description here

jeremysprofile
  • 10,028
  • 4
  • 33
  • 53
Vy Do
  • 46,709
  • 59
  • 215
  • 313
  • 2
    doesn't work on a mac, if anyone can add another answer – orbfish Mar 04 '16 at 21:00
  • 4
    It in fact does work on OS X*, the option is called "Reveal in Finder". * At least with recent IntelliJ versions, I haven't tested old releases. – jjpe Apr 22 '16 at 08:43
  • 1
    Thx man, I'd never guess pressing the 'del' button... It's like: "what the ...???" --- "Explicit is better than implicit" – vk23 Oct 04 '16 at 20:56
  • A minor change to those instructions in step 4 for version 2017.2.5: just hovering the cursor over the deleted project name is insufficient; you must select it by clicking it, and then click the 'Remove from list' button in the popup dialog titled 'Reopen Project' that is displayed. – skomisa Oct 07 '17 at 02:05
  • 2
    So you can't rename a project (check [here](https://stackoverflow.com/questions/18493379/how-to-rename-move-a-project-in-intellij-idea-12) and [here](https://stackoverflow.com/questions/21177495/renaming-a-project-in-intellij-idea/21180363) if you don't believe me) in a designed way and you can't delete a project in a designed way. I find it flabbergasting. Only workarounds/dirty hacks. Are you sure that just removing the deleted project from the `recent projects` list erases all its traces from the metafiles in the IntelliJ user configuration folder? I doubt it... – z33k Feb 23 '18 at 12:40
  • On Linux, the "Show in Files" option (equivalent to "Show in Explorer" in Windows) will open the location of the source folder in Files. If you want to delete all of the source files, then you can delete that folder. If you want to delete *only* the IntelliJ project specific files, then you can just delete the `.idea` folder. – pacoverflow Mar 18 '19 at 19:40
12

Deleting and Recreating a project with same name is tricky. If you try to follow above suggested steps and try to create a project with same name as the one you just deleted, you will run into error like

'C:/xxxxxx/pom.xml' already exists in VFS

Here is what I found would work.

  1. Remove module
  2. File -> Invalidate Cache (at this point the Intelli IDEA wants to restart)
  3. Close project
  4. Delete the folder form system explorer.
  5. Now you can create a project with same name as before.
Ashburn RK
  • 450
  • 3
  • 8
  • you saved me buddy, i just migrated to intelliJ from eclipse – Amol Bais Jul 03 '20 at 12:59
  • I followed [this](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206279599-How-do-you-remove-module-from-project-only-) to remove the module. – Varun Jan 15 '22 at 14:40
1

I am doing it manually in Intellij IDEA v2021.3.1, Ubuntu 20.04.

Steps:

  1. Select Project
  2. File > Close Project
  3. Right-click on project > Remove from Recent Projects enter image description here
  1. cd ~/IdeaProjects
  2. rm -fr ProjectDir
jumping_monkey
  • 5,941
  • 2
  • 43
  • 58
  • 1
    I removed any `.iml` file as well as the whole subdirectory `.idea` but when I reopened intellij in the project directory it complained that there is this module already. Only after I went through the procedure above (except for the `rm -rf), I could re-open and re-configure the project. – Harald Feb 19 '23 at 12:21
0

You will have to manually delete from the project explorer (your local machine hard drive), then delete the project in IntelliJ when it asks to re-open recent projects.

0

In my strange case, Intellij remembers forever about my project even if I delete .iml... Thus I did the following:

  1. Close project. Delete the .iml file.
  2. Rename my project directory (say my_proj) to my_proj_backup.
  3. (Possibly not needed) Open my_proj_backup in Intellij and close.
  4. Create an empty directory called my_proj, and open it in Intellij. Then close it.
  5. Remove the my_proj and move my_proj_backup back to my_proj. Then open my_proj in Intellij.

Then it happily forgot the old my_proj :)

ch271828n
  • 15,854
  • 5
  • 53
  • 88