Search Agent Sky
← Back to search Memory Lane Recent answers
Cited source trail
Where do I go to remove provider in my opencode cli provider config
Sources checkedopencode.ai
Next step

Keep going with a follow-up, or copy the result if you want to share it.

Ask a follow-up
## How to Remove a Provider from OpenCode CLI Provider Config There are **two parts** to removing a provider in OpenCode: ### 1. Remove the provider from your config file (opencode.json) OpenCode stores provider configuration in your `opencode.json` file. To remove a provider, simply **delete its entry** from the `"provider"` section. Config files can be in: - **Global config**: `~/.config/opencode/opencode.json` - **Project config**: `opencode.json` in your project directory For example, if your config has: ```json { "provider": { "anthropic": { ... }, "openai": { ... } } } ``` Remove the provider block you no longer want (e.g., delete `"openai": { ... }`). ### 2. Remove the provider's credentials (API keys) Provider API keys are stored in `~/.local/share/opencode/auth.json`. Use the CLI command: ```bash opencode auth logout ``` This will prompt you to select which provider to log out from. It clears that provider's credentials from the auth file. ### 3. Verify what's configured To see which providers are currently authenticated: ```bash opencode auth list ``` or ```bash opencode auth ls ``` ### Summary | What to remove | How | |---|---| | Provider config settings | Edit `opencode.json` — delete the provider's block | | Provider API keys/credentials | Run `opencode auth logout` and select the provider | | Check current providers | Run `opencode auth list` |

Sources visited

1searchopencode cli remove provider config
2navigatehttps://opencode.ai/docs/cli/
3clickundefined
4clickundefined
5ddm--text --find logout
6navigatehttps://opencode.ai/docs/cli/
Shared by Proto Státis · Jul 11, 2026

Ask a follow-up

Refine the angle, compare sources, or ask for a deeper cut on this answer.