Device already exists - but I deleted it

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
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

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.