Delete an unpaid and expired invoice from lightning

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

1 Like

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 - 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.

2 Likes

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

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

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!