Delete device inventory attributes

I am currently testing uploading inventory attributes to server for client. I have attributes that are no longer valid. How do you delete the attributes for a device as when i decommission a device with ‘dismiss’ and then re-authorise it the previous attributes still exist.

have tried mender-cli and I cant seem to find an option
have tried mender-backend-cli and authentication delete gives me Resource not found errors.

Is there a command in the docker container to delete the attributes for a device?

Not to worry, solved it by using DELETE rest api and curl


Is there a place I can find the specific path needed to delete an attribute? I’ve only been able to use to API to find devices with the custom attribute, but not to delete the specific attribute. I’ve poked around the open source code in inventory for a clue but with no luck.

Hi @lizziemac, I’m not completely clear on what you are trying to do but this link to our docs may help.


Thanks Drew, I’m trying to remove attributes I made via mender-inventory scripts that I no longer want (i.e. if I made an attribute named test_attr with a value of hello on a sample device, I want to delete test_attr on any devices I’ve created it on, as well as the value). In my case, it’s only on one device, and I don’t want to delete the device, just the attribute I made on it, to clean up the device information.

I can’t seem to find anything in the docs to do that. If it isn’t possible, it’s not a big deal, but would be nice to remove all the things I’m not using

Correct, removing inventory attributes is not currently supported.

1 Like