Remove Projects From Sublime Text Switch Project Window

Remove Project From Switch Projects in Sublime TextI am a big fan of Sublime Text. To switch between existing projects, I like to use the CTRL+ALT+P shortcut in my Kubuntu, which opens the Switch Project window and lets me easily switch to another project. However, if I delete a project, it doesn’t get removed from this list. Fortunately, there is a workaround. Here is how you can remove your deleted or moved project from the Switch Project window.

First of all, close Sublime Text. If you keep it open while continuing, your work will be for naught.

Use your favorite text editor and open the following file:

>vim ~/.config/sublime-text-3/Local/Session.sublime_session

(The paths are different on Windows and Mac. Try looking here:
Mac: ~/Library/Application Support/Sublime Text 2/Settings/Session.sublime_session
Windows: C:\Users\[Username]\AppData\Roaming\Sublime Text 2\Settings\Session.sublime_session)

Find the section named Workspaces. In my case, it contains three projects:

"workspaces":
{
    "recent_workspaces":
    [
        "/home/petr/projects/projectA/projectA.sublime-workspace",
        "/home/petr/projects/projectB/projectB.sublime-workspace",
        "/home/petr/projects/projectC/projectC.sublime-workspace",
    ]
}

Let’s assume I deleted the folder containing project ProjectC, so I want to remove it from the Switch Project window. All I need to do is to simply remove the corresponding line in the file, save the file, and exit.

Now the relevant section should look like this:

"workspaces":
{
    "recent_workspaces":
    [
        "/home/petr/projects/projectA/projectA.sublime-workspace",
        "/home/petr/projects/projectB/projectB.sublime-workspace",
    ]
}

Once done, reopen Sublime Text, go to your Switch Project window and you’ll see two projects there instead of three.

Bookmark the permalink.
  • Artem Rykov

    Спасибо!

    • Glib

      Нема за що)

  • Jacob White

    The path for Session.sublime_session for me was a little different now that this post is a couple years old.

    Windows 7 64 bit
    Sublime Text 3
    C:Users[Username]AppDataRoamingSublime Text 3LocalSession.sublime_session)

  • Lucas Bustamante

    It worked, thanks!