Revoking the certificate without deleting it


I am trying to revoke the certificate but do not want to delete it.

When I execute this:
certbot revoke --cert-path /home/random/cert.pem --config-dir /home/random/config --work-dir /home/random --logs-dir /home/random/logs --server

It asks for this:
Would you like to delete the cert(s) you just revoked?
(Y)es (recommended)/(N)o:

To avoid this, I can give –non-interactive flag, but that takes the answer to above question as YES.

Is there a way where it runs non interactively and doesn’t try to delete the certificate??


Hi @anirudh

a workaround: Can you first copy the certificate to another place, then revoke it?


Since certbot 0.21.0:

The flags --delete-after-revoke and --no-delete-after-revoke were added allowing users to control whether the revoke subcommand also deletes the certificates it is revoking.