sincecutoff.com
← all changes

railway service delete removes a service from an environment

Introduced 2026-04-23 · score 0.97

HOW TO USE IT

When removing a service from an environment, run `railway service delete`; pass `--service` and `--environment` to target them explicitly, and use `--yes` to skip confirmation. In non-interactive mode, add `--2fa-code <code>` if 2FA is enabled; add `--json` for JSON output.

railway service delete --service <service-name-or-id> --environment <environment> --yes --json
railway service delete --service <service-name-or-id> --environment <environment> --yes --2fa-code <two-factor-code>

WHY THIS HELPS

Remove a service from an environment using the Railway CLI.

REQUIREMENTS AND LIMITATIONS

  • Version: v4.42.0
  • --service <SERVICE>: Service name or ID to delete; defaults to the linked service.
  • --environment <ENVIRONMENT>: Environment to delete the service from; defaults to the linked environment.
  • --yes: Skip the confirmation dialog; non-interactive deletion requires this to skip prompting.
  • --json: Output in JSON format.
  • --2fa-code <TWO_FACTOR_CODE>: 2FA code for verification; required if 2FA is enabled in non-interactive mode.
  • `--service` defaults to the linked service.
  • `--environment` defaults to the linked environment.
  • `--2fa-code` is required for verification if 2FA is enabled in non-interactive mode.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card