Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove a custom terminal profile from Visual Studio Code?

How do I delete the custom profile "New 1" as shown in the picture?

enter image description here

like image 223
SH C Avatar asked Oct 21 '25 15:10

SH C


2 Answers

I'm using Zsh, so I suggest configuration

"terminal.integrated.profiles.osx": {
    "zsh": {
        "path": "/bin/zsh",
        "icon": "star",
        "env": {
        "TESTING_VAR": "abc"
        }
    }
},
"terminal.integrated.defaultProfile.osx": "zsh",
like image 120
zhuziyi Avatar answered Oct 23 '25 06:10

zhuziyi


As described in the Configuring profiles section of the VS Code docs), when you create a custom terminal profile, it adds an entry to your settings.json file:

The recommended way to create a new profile is to run the Terminal: Select Default Profile command and activate the configure button on the right side of the shell to base it on. This will add a new entry to your settings that can be tweaked manually in your settings.json file.

...

"terminal.integrated.profiles.windows": {
 "PowerShell -NoProfile": {
   "source": "PowerShell",
   "args": ["-NoProfile"]
 }
},
"terminal.integrated.profiles.linux": {
 "zsh (login)": {
   "path": "zsh",
   "args": ["-l"]
 }
}

So open your User settings and you'll find the terminal.integrated.profiles.<OS> setting with an added entry for your custom profile under your corresponding OS. It is better to open the settings.json file directly, or open it from the UI "Edit settings.json":

settings UI

settings UI screenshot

settings.json

"terminal.integrated.profiles.osx": {
    "1": {
        "path": "bash"
    }
}

(I'm using a Mac OS so I have it in .osx. It gets added correspondingly to .linux or .windows)

To remove your custom profile:

  1. Simply delete your custom profile ("1": {...}) from terminal.integrated.profiles
  2. Reload/Restart VS Code

When VS Code reloads/restarts, the removed custom profiles should be gone. (It seems these custom profiles are read and loaded one-time during VS Code startup).

Note though that this only works for custom profiles. For built-in profiles, you'll have to set the profile to null instead:

To remove profile entries from the dropdown, set the name of the profile to null. For example, to remove the Git Bash profile on Windows, use this setting:

"terminal.integrated.profiles.windows": {
 "Git Bash": null
}
like image 33
Gino Mempin Avatar answered Oct 23 '25 08:10

Gino Mempin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!