# Dismiss a domain and relative certificate procedure (certbot)

**URL:** <https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604>\
**Category:** Server\
**Created:** [December 4, 2017, 8:28am UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604 "2017-12-04T08:28:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danjde](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/danjde/32/8575_2.png) [@danjde](https://community.letsencrypt.org/u/danjde)\
**Post date:** [December 4, 2017, 8:28am UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/1 "2017-12-04T08:28:59Z")

</div>

Hi Friends,  
I’m wondering how correctly remove a single domain Letsencrypt certificate.  
I’ve read [this](https://www.jeffgeerling.com/blog/2016/remove-single-certbot-letsencrypt-certificate-server) tutorial where describe this procedure:

1. `certbot -delete [sitename]`

2. `rm -rf /etc/certbot/archive/[sitename]/ rm -rf /etc/certbot/live/[sitename]/ rm -rf /etc/certbot/renewal/[sitename].conf`

3. `certbot revoke -d [sitename]`

is it correct this procedure?

Many many thanks!

Davide

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [December 4, 2017, 11:23am UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/2 "2017-12-04T11:23:59Z")

</div>

> [@danjde](#):
>
> is it correct this procedure?

No.

As you can read from that "tutorial", it was written in 2016. And it says the delete feature is still "an issue" (i.e., a feature wanted, but not implemented yet).

In the mean time, it has been more than a year since that tutorial was written. And the `delete` feature has been implemented, but not the same way as the tutorial suggests.

You can read about deleting certificates in the [certbot userguide in the part about revoking certificates](https://certbot.eff.org/docs/using.html#revoking-certificates). (Which is odd by the way, because revoking is NOT necessary if the private key hasn't been leaked.)

I would suggest using `certbot certificates` to identify the correct `cert-name` to delete and after you're sure you have identified the correct certificate, use the commands in the link above to delete it. And again, if the certificates private key hasn't been leaked, there's NO reason to revoke the certificate.

---

<div class="post-metadata">

**Author:** ![danjde](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/danjde/32/8575_2.png) [@danjde](https://community.letsencrypt.org/u/danjde)\
**Post date:** [December 4, 2017, 11:58am UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/3 "2017-12-04T11:58:05Z")

</div>

Ah, thanks @Osiris! Now I'm clearer.

In relation to your hint:

> [@Osiris](#):
>
> I would suggest using `certbot certificates` to identify the correct cert-name...

is not clear for me how use certbot certificates,  
because running

`certbot certificates`

obtain:

_certbot: error: unrecognized arguments: certificates_

I'm using _certbot 0.8.1-2_

Many thanks again!

Davide

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [December 4, 2017, 11:59am UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/4 "2017-12-04T11:59:19Z")

</div>

> [@danjde](#):
>
> I’m using certbot 0.8.1-2

Holy \*\*\*...

You realise that version is more than a year old?!?

---

<div class="post-metadata">

**Author:** ![danjde](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/danjde/32/8575_2.png) [@danjde](https://community.letsencrypt.org/u/danjde)\
**Post date:** [December 4, 2017, 10:55pm UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/5 "2017-12-04T22:55:20Z")

</div>

Uh, oh…  
Well, I’ve upgraded and now `certbot certificates` show correctly all certificates 🙄

Only one question again: on /etc/crontab could I comment the lines

```
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew

```

If from crontab -e I already have this configuration:

`0 */12 * * * /usr/bin/certbot renew --renew-hook "/usr/sbin/service apache2 reload" --quiet`

Thanks for the patience 🙂

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [December 4, 2017, 10:56pm UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/6 "2017-12-04T22:56:53Z")

</div>

You shouldn’t edit `/etc/crontab` manually, always use `crontab -e`.

Why both methods differ? I don’t know 😛

Did you run `crontab -e` as root?

---

<div class="post-metadata">

**Author:** ![mnordhoff](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mnordhoff/32/22583_2.png) [@mnordhoff](https://community.letsencrypt.org/u/mnordhoff)\
**Post date:** [December 4, 2017, 11:27pm UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/7 "2017-12-04T23:27:07Z")

</div>

If you have systemd, the cron job doesn’t run and a systemd timer is used instead.

---

<div class="post-metadata">

**Author:** ![danjde](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/danjde/32/8575_2.png) [@danjde](https://community.letsencrypt.org/u/danjde)\
**Post date:** [December 5, 2017, 2:16pm UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/8 "2017-12-05T14:16:57Z")

</div>

> [@Osiris](#):
>
> Did you run crontab -e as root?

Sure! And not from sudo!

> [@mnordhoff](#):
>
> If you have systemd, the cron job doesn’t run and a systemd timer is used instead.

Ah, so I can comment totally /etc/crontab, is it true?

Many thanks to all! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [January 4, 2018, 2:17pm UTC](https://community.letsencrypt.org/t/dismiss-a-domain-and-relative-certificate-procedure-certbot/47604/9 "2018-01-04T14:17:14Z")

</div>

Closed on January 4, 2018, 2:17pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
