# Cleaning up stuck devices

**URL:** <https://hub.mender.io/t/cleaning-up-stuck-devices/1683>\
**Category:** General Discussions\
**Created:** [March 24, 2020, 6:44pm UTC](https://hub.mender.io/t/cleaning-up-stuck-devices/1683 "2020-03-24T18:44:06Z")\
**Posts on this page:** 1\
**Page:** 1

<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 24, 2020, 6:44pm UTC](https://hub.mender.io/t/cleaning-up-stuck-devices/1683/1 "2020-03-24T18:44:06Z")

</div>

When Mender enabled devices have their certificate regenerated, then it is a bit unclear how to use them properly in the Mender web UI. This will happen frequently during development as the devices are reimaged and have a completely new image installed which will effectively, unless you take other precautions, delete and recreate the certificate.

In these situations, if the device is already authenticated to a Mender server, then there will be a new authentication set associated with the device that needs to be accepted. This will be shown in the devices tab as shown below:

 ![DevicesTab](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/dd95e5bdc6142659d2e447b552c69c8c4452c856.png)

When you expand the device details, there is a notification that “This device has a pending authentication set.”:

 ![Details](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/361798b8f68946f9914f7ac9c8ff5bae23ce798c.png)

If you then click the warning text, you will open up the _Authorization Status_ dialog where you will see the pending authentication set:

 ![authstatus](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/1e7afec2ad7267d0b9f624d646c8ea94dee16260.png)

Simply accept the latest inactive authentication set and your device will be readmitted to the fleet.

Alternatively, you can simply click the red _DECOMMISSION DEVICE_ text to have the device removed completely from your fleet. On the next polling interval the device will be available in pending state.
