How can I cleanly remove Workspaces in Visual Studio Code?

Viewed 82053

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.

6 Answers

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

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

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

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.

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 .

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.

Related