# Delete an unpaid and expired invoice from lightning

**URL:** <https://community.umbrel.com/t/delete-an-unpaid-and-expired-invoice-from-lightning/751>\
**Category:** Support and Troubleshooting\
**Created:** [May 9, 2021, 4:02pm UTC](https://community.umbrel.com/t/delete-an-unpaid-and-expired-invoice-from-lightning/751 "2021-05-09T16:02:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![no99](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@no99](https://community.umbrel.com/u/no99)\
**Post date:** [May 9, 2021, 4:02pm UTC](https://community.umbrel.com/t/delete-an-unpaid-and-expired-invoice-from-lightning/751/1 "2021-05-09T16:02:30Z")

</div>

how can you delete an unpaid and expired invoice from lightning?

---

<div class="post-metadata">

**Author:** ![DarthCoin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/darthcoin/32/1628_2.png) [@DarthCoin](https://community.umbrel.com/u/DarthCoin)\
**Post date:** [May 10, 2021, 8:19am UTC](https://community.umbrel.com/t/delete-an-unpaid-and-expired-invoice-from-lightning/751/3 "2021-05-10T08:19:40Z")

</div>

I use in lnd.conf this line:  
Mark unpayable, unpaid invoices as deleted  
`gc-canceled-invoices-on-startup=1`  
`gc-canceled-invoices-on-the-fly=1`

More detailes about lnd.conf on [LND github page](https://github.com/lightningnetwork/lnd/blob/master/sample-lnd.conf) - but I suggest caution. Do that only if you really understand what are you doing. Any wrong line in that lnd.conf file can break your node and you will need to stop it and troubleshoot your lnd.conf again.

---

<div class="post-metadata">

**Author:** ![o2k](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/o2k/32/1900_2.png) [@o2k](https://community.umbrel.com/u/o2k)\
**Post date:** [December 23, 2021, 4:32am UTC](https://community.umbrel.com/t/delete-an-unpaid-and-expired-invoice-from-lightning/751/4 "2021-12-23T04:32:09Z")

</div>

I guess you have to restart the server after editing that config file, right? (just editing the file did nothing).

---

<div class="post-metadata">

**Author:** ![DarthCoin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/darthcoin/32/1628_2.png) [@DarthCoin](https://community.umbrel.com/u/DarthCoin)\
**Post date:** [December 24, 2021, 9:39pm UTC](https://community.umbrel.com/t/delete-an-unpaid-and-expired-invoice-from-lightning/751/5 "2021-12-24T21:39:37Z")

</div>

What do you think? Restart is a must after each edit of lnd.conf

---

<div class="post-metadata">

**Author:** ![o2k](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/o2k/32/1900_2.png) [@o2k](https://community.umbrel.com/u/o2k)\
**Post date:** [December 29, 2021, 2:41am UTC](https://community.umbrel.com/t/delete-an-unpaid-and-expired-invoice-from-lightning/751/6 "2021-12-29T02:41:37Z")

</div>

Well, I wasn’t sure, that’s why I asked. But in the end it seems a restart wasn’t needed. When the Bitcoin node was synced 100% the unpaid invoices disappeared without restarting!
