Remove JFrog CLI Server Configurations
Remove one or all JFrog CLI server configurations and their stored credentials.
jf config rm (remove) deletes one or all server entries from your local JFrog CLI configuration. Removing a server clears stored credentials for that ID. Omitting the server ID removes every configured server. Use --quiet to skip the confirmation prompt in an interactive terminal.
This topic covers:
Synopsis
jf config rm <server-id>Aliases: jf c rm
Where:
<server-id>: Optional. When provided, only that server is removed. When omitted, all servers are removed. Append flags such as--quietas needed.
Arguments
The following table describes command arguments.
| Argument | Required | Description |
|---|---|---|
server-id | No | Remove only this server. Omit to remove all |
Options
The following table describes command options.
| Flag | Default | Description |
|---|---|---|
--quiet | false (or $CI) | Skip the interactive confirmation prompt. JFrog CLI does not detect whether it is running in a terminal. The prompt is suppressed automatically only when the CI environment variable is set to true. In a non-interactive script that does not set CI=true, the prompt still appears. With no input available, JFrog CLI defaults to "no" (the server is not removed) and still exits 0. Pass --quiet explicitly in any automation that cannot guarantee CI=true. |
Examples
Remove a Specific Server
To remove a specific server:
-
Run:
jf config rm <server-id> --quietWhere:
<server-id>: The ID of the server to remove.
For example:
jf config rm staging-server --quiet -
Confirm the configuration. No output is printed on success.
To verify the removal:
-
Run:
jf config show
Remove All Servers
To remove all configured servers:
-
Run:
jf config rm --quiet -
Confirm that no servers remain. No output is printed on success.
To verify all configurations are gone:
-
Run:
jf config showExpected: empty output (no servers configured).
Recover After Removing the Active Server
If you removed the currently active server, another server must become the default before JFrog CLI commands target a platform.
To set a different server as the active default:
-
Run:
jf config use <other-server-id>Where:
<other-server-id>: A server ID that remains in your configuration.
For example:
jf config use dev-server
Important Notes
- Destructive action. Removing a server configuration deletes its stored credentials permanently. You cannot undo this. After removing, run
jf config showto confirm the expected servers are no longer listed. - Remove all. Omitting the server ID removes all stored configurations. The
--quietflag skips the confirmation prompt. JFrog CLI does not detect a non-interactive shell on its own. The prompt is auto-suppressed only when theCIenvironment variable is set totrue. A script that sets neitherCI=truenor--quietstill hits the prompt. Since no input reaches it, JFrog CLI defaults to "no" (nothing is removed) yet the command still exits0. Confirm the outcome withjf config showrather than relying on the exit code alone. - Active server. If you remove the active (default) server, there is no active server until you run
jf config use <other-id>or add a new one withjf config add. - CI/CD cleanup. In pipelines, add
jf config rm <server-id> --quietas a teardown step to avoid leaking credentials in ephemeral environments. - Non-existent server ID. If the specified
server-iddoes not exist, the JFrog CLI prints an informational message and exits 0. Confirm your server ID withjf config showbefore you run remove in automation scripts. - Empty output after remove all. After removing all servers,
jf config showreturns empty output with exit code 0. This is expected. It does not indicate an error.
Frequently Asked Questions
This section provides answers to frequently asked questions.
FAQs
Q: How do I remove a JFrog CLI server configuration?
A: Run jf config rm <server-id> --quiet to remove a specific server, or jf config rm --quiet to remove all servers. See Remove a Specific Server for the full example.
Q: What happens if I run jf config rm in a script without --quiet or CI=true?
jf config rm in a script without --quiet or CI=true?A: JFrog CLI still shows the confirmation prompt. Since no input reaches it, JFrog CLI defaults to "no" and removes nothing, but the command still exits 0. Pass --quiet (or set CI=true) to skip the prompt, and confirm the outcome with jf config show.
Q: What do I need before removing a server configuration?
A: You need the server ID you want to remove. Confirm it first with jf config show since removal deletes stored credentials permanently.
Q: Can I recover a server after removing it?
A: No. Removal permanently deletes the stored credentials. If you removed the active server, see Recover After Removing the Active Server to set a new default.
Q: What's the difference between removing one server and removing all servers?
A: Passing <server-id> removes only that entry. Omitting the ID removes every configured server, so use --quiet carefully in automation.
Related Topics
Updated 2 days ago
What’s Next
For more information about configuring a new server, see Add a JFrog CLI server configuration.
