Forrest logo
back to the security tool

security:tldr:c788f

security: Remove a CA certificate from the per-user Trust Settings.
$ security remove-trusted-cert ${path-to-ca-cert_file-pem}
try on your machine

The command "security remove-trusted-cert ${path-to-ca-cert_file.pem}" is used to remove a trusted certificate from the keychain on macOS.

Here's the breakdown of the command:

  • "security": This is the command-line utility on macOS used for managing various security-related tasks.
  • "remove-trusted-cert": This is the specific action or sub-command you're telling the "security" utility to perform.
  • "${path-to-ca-cert_file.pem}": This is a placeholder representing the actual file path of the CA (Certificate Authority) certificate file in PEM format that you want to remove. You need to replace "${path-to-ca-cert_file.pem}" with the actual path to the certificate file on your system.

By running this command, you are instructing the "security" utility to remove the specified CA certificate from the list of trusted certificates in the keychain. This can be useful when you no longer want to trust a specific certificate or want to update the list of trusted certificates on your macOS system.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the security tool