# Can not decommission a device. says 404

**URL:** <https://hub.mender.io/t/can-not-decommission-a-device-says-404/408>\
**Category:** General Discussions\
**Created:** [March 22, 2019, 4:05pm UTC](https://hub.mender.io/t/can-not-decommission-a-device-says-404/408 "2019-03-22T16:05:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbbh](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bbbh](https://hub.mender.io/u/bbbh)\
**Post date:** [March 22, 2019, 4:05pm UTC](https://hub.mender.io/t/can-not-decommission-a-device-says-404/408/1 "2019-03-22T16:05:25Z")

</div>

when setting a device to decommission in the UI i get

There was a problem decommissioning the device: cannot DELETE /api/management/v1/devauth/devices/5c8671a730665000010a0fee (404)…

looking at the logs i can see it hit the container devauth. it also is saying 404

time=“2019-03-21T20:13:22Z” level=info msg=“404 315μs DELETE /api/management/v1/devauth/devices/5c8671a730665000010a0fee HTTP/1.0 - Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36” file=middleware.go func=“accesslog.(\*AccessLogMiddleware).MiddlewareFunc.func1” line=60 request\_id=3a203c41-aec8-48cf-9ffa-3bcba3761111 user\_id=60a44ce7-d637-451c-93a9-21c02b91ffff

how can i debug this issue?

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [March 22, 2019, 5:45pm UTC](https://hub.mender.io/t/can-not-decommission-a-device-says-404/408/2 "2019-03-22T17:45:26Z")

</div>

Hi @bbbh the first step is to enumerate the devices and make sure you are using the right ID.  
The following worked for me.

> $ curl -H “Authorization: Bearer $JWT” $MENDER\_SERVER\_URI/api/management/v2/devauth/devices | jq

followed by:

> curl -H “Authorization: Bearer $JWT” -X DELETE $MENDER\_SERVER\_URI/api/management/v2/devauth/devices/5c951e92d75c9c000167440d

Specifically I was testing on Hosted Mender.
