# How to purge a scheduled confirmed downlink

**URL:** <https://www.thethingsnetwork.org/forum/t/how-to-purge-a-scheduled-confirmed-downlink/56849>\
**Category:** The Things Stack v3\
**Created:** [May 4, 2022, 11:42am UTC](https://www.thethingsnetwork.org/forum/t/how-to-purge-a-scheduled-confirmed-downlink/56849 "2022-05-04T11:42:36Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![jpmeijers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jpmeijers/32/44875_2.png) [@jpmeijers](https://www.thethingsnetwork.org/forum/u/jpmeijers)\
**Post date:** [August 19, 2022, 10:07am UTC](https://www.thethingsnetwork.org/forum/t/how-to-purge-a-scheduled-confirmed-downlink/56849/8 "2022-08-19T10:07:44Z")

</div>

Just leaving this here, as it will help find the correct command:

> [@ABP: Disable mac sending of commands](https://www.thethingsnetwork.org/forum/t/abp-disable-mac-sending-of-commands/51276/26):
>
> The magic flush command is: ttn-lw-cli dev set $application $device --unset mac-state.pending-application-downlink

> <https://github.com/TheThingsNetwork/lorawan-stack/issues/4289#issuecomment-865297441>
>
> \#### Summary
> If firmware has a remote "reboot" command and the operator sends t…his as a confirmed downlink, both the device & stack end up in a perpetual loop as the downlink doesn't get ack'd so the stack resends the downlink, repeat ...
> 
> \#### Why do we need this?
> So when an operator fails to follow instructions, we can get them out of the mess
> 
> \#### What is already there? What do you see now?
> I tried adding a downlink to the queue with replace - didn't clear the expected ack, wasn't really expecting it to.
> I tried a reset with --mac-state.pending-application-downlink but that didn't do what we needed
> I tried resetting the MAC state but that means the join session was lost & we had to wait for the device to realise it was offline.
> 
> \#### What is missing? What do you want to see?
> CLI option to flush the entire downlink state
> 
> This may exist but I can't see which field is the way to go
> 
> 
> \#### Environment
> TTS CE
> 
> \#### How do you propose to implement this?
> Sorry, above my pay grade
> 
> \#### How do you propose to test this?
> Once it's implemented
> 
> \#### Can you do this yourself and submit a Pull Request?
> No

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/how-to-purge-a-scheduled-confirmed-downlink/56849)._
