35

I'm on a MAC and remove workspaces with the terminal in the folder ~/Library/Application Support/Code/User/workspaceStorage, but i don't think it's the clean way.

Can someone explain me how I can remove cleanly a workspace and all its files from my mac?

I miss this feature. I can add many workspaces, but where is the "delete button"?

I use Visual Studio Code V.1.28.2 on macOS Mojave 10.14.

2
  • How do you add workspaces? I have not been able to figure this one out.
    – aarffy
    Commented Nov 4, 2018 at 19:04
  • Just add a Folder and save as Workspace. ;)
    – MonTea
    Commented Nov 4, 2018 at 20:27

7 Answers 7

44

You can use the command palette:

Menu: View > Command Palette... (or F1)

Search: "Workspaces: Remove Folder from Workspace..." and select the folder you want to remove.

Workspaces:Remove Folder from Workspace...

Hope this may help you

1
  • 2
    Thanks, very convenient! I just add for non-experienced VS users. Cmd+Shift+P (launch Command Palette) and then type the search string. The search engine is good, so the query may not start from "Workspaces: [...]".
    – owblique
    Commented Aug 22, 2020 at 19:16
16

Visual Studio Code 1.32.3. Windows 10.

Here's the answer from the Twitter account of Visual studio code:

From Twitter

You have just to go to the Explorer section and remove any folder or file in it see the image below:

Image 2

right click in the workspace you'd like to remove and select the "Remove Folder from Workspace" item; the name of the workspace will become: "NO FOLDER OPENED" that is the one you'll get when you installed the very first time Visual Studio Code.

Default

2
  • 5
    There is no such menu in my latest version. I get "open editors", "outline", "hide", etc. No way but to shut down VSC and re-open a "new window" instance.
    – JosephK
    Commented Oct 24, 2019 at 3:04
  • Yes, it doesn't work on VSC Version: 1.47.3 on MacOS. See the thread stackoverflow.com/a/59896610/5028342
    – owblique
    Commented Aug 22, 2020 at 19:20
6

If none of the above solutions works ...you can go to file -> close folder.

It will close the workspace folder and you can add any new folder to the explorer, like the first time you install visual code

here is description image

1
  • 1
    Close <> remove.
    – Déjà vu
    Commented Mar 31, 2023 at 3:26
6

The only other relevant answer is this .

The Workspaces is stored at %userprofile%\AppData\Roaming\Code\User\workspaceStorage (Windows) , none of the mentioned actions will delete them .

There also can be a .code-workspace Workspace File or "Workspace Config" , which can be moved anywhere . And .vscode Workspace Folder/-s in the folder/-s which was added to the workspace .

Deleting all existing of these 3, and the relevant items from : %userprofile%\AppData\Roaming\Code\storage.json and all %userprofile%\AppData\Roaming\logs<< .. >> . Will be a workspace deletion .

Also, when the same Workspace File is opened from different location, it seems that a new Workspace is created at the workspaceStorage , so there would be 2 related Workspaces .

5

find workspace.json, it will be inside the workspace you had created workspaces->[unique number]->workspace.json . you can edit the workspace directories in it.

1

It seems that workspaces are either open or closed, you can close them from the main menu. To cleanly delete a workspace, just remove the workspace file from disk also.

2
  • Is the folder I Posted the only place?
    – MonTea
    Commented Dec 1, 2018 at 13:24
  • 2
    Please Point directly where it Is. I didnt found a remove workspace in Main Menu.
    – MonTea
    Commented Dec 1, 2018 at 13:27
0

In case of a Java application, you can use the command (ctrl-shift-P) "clean java language server workspace"

Not the answer you're looking for? Browse other questions tagged or ask your own question.