# Device already exists - but I deleted it

**URL:** <https://wazo-platform.discourse.group/t/device-already-exists-but-i-deleted-it/124>\
**Category:** Installation/Configuration\
**Created:** [January 2, 2020, 3:37am UTC](https://wazo-platform.discourse.group/t/device-already-exists-but-i-deleted-it/124 "2020-01-02T03:37:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [January 2, 2020, 3:37am UTC](https://wazo-platform.discourse.group/t/device-already-exists-but-i-deleted-it/124/1 "2020-01-02T03:37:34Z")

</div>

Does anyone know how to delete a device using the CLI?

I am doing an installation by Web UI

I deleted devices, lines and users in an attempt to start over and be sure I was learning how to do things right.

When I went to add back one of the devices - by MAC address - I got the error message “Device already exists”.

I checked and there is nowhere that the device is showing up.

I deleted the config files from the tftpboot and templates folders but the erro persists.

I read a 4-year-old post at  
[https://projects.wazo.community/boards/8/topics/3804](https://projects.wazo.community/boards/8/topics/3804)  
where it says there was a bug and it instructed the person to run

> `xivo-provd_pycli -c "devices.remove (devices.find ({'mac': '00: 108: 5D: 1A: 53: 58 '}) [0] [' id '])" -p' '`

to fix the issue, but when I tried that on the current (19.17) system - even after I changed it to

> wazo-provd-cli -c “devices.remove (devices.find ({‘mac’: '00: 108: 5D: 1A: 53: 58 ‘}) [0] [’ id '])” -p’ ’

it triggered error messages

So, I did a grep for the IP address and the device ID which was shown in the log at

> /var/log/wazo-provd.log

but nothing came up

Does anyone know how to delete a device using the CLI?

Richard

---

<div class="post-metadata">

**Author:** ![Ramblin](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/ramblin/32/34_2.png) [@Ramblin](https://wazo-platform.discourse.group/u/Ramblin)\
**Post date:** [January 2, 2020, 11:06am UTC](https://wazo-platform.discourse.group/t/device-already-exists-but-i-deleted-it/124/2 "2020-01-02T11:06:36Z")

</div>

I slept on it , woke up, restarted the system and voila, there was the problem.

I had created a tenant for my setup and thought I had done all my configurations in it.

But on a fresh restart, it always comes up with master and there was the device, in the master configuration but not the tenant.

So I deleted it out of master and could then add it in tenant.

Sorry for posting a question that was due to my fumble-fingers.

If anyone knows how to set this topic as solved, please advise.
