Impossible to remove services

Hi, just as the title say, how can I remove a service?

When I do a status I get

 device                     | type              | state        | address
--------------------------------------------------------------------------------------------
 ...    | device            | connected    | 127.0.0.1:65535


 service                    | type              | state        | address                  | enabled
-------------------------------------------------------------------------------------------------------
 90:00:00:00:00:13:6C:39    | TCP (1)           | connected    | 127.0.0.1:22             | true
...

I added that service with sudo remoteit add --name ssh --port 22 --type 1. To remove it, I tried with
sudo remoteit remove --id [...] but it gives error 3000
or
sudo remoteit connection remove --id [...] it says ok but if I check with status it is still there. I also tried before to do a disconnect but it still say “connected”.

What should I do to remove it? I can’t access the web UI in case, only from bash. Thank you.

If you do not have any active connections, then you can delete it.
If the service doesn’t exist on that device, you cannot remove it. The CLI is meant to control that device. You can remove the service from the web UI or from your desktop application from that device or any other device if it is cloud configurable (this should be the case for most modern devices). You can determine that by looking at your list and showing that attribute or by looking at the detail page. See attached images.



If it is configurable, then you can delete the service by clicking on the service, then the 3 dots in the upper right and selecting “Delete Service”

Isn’t there a faster way without using web ui? I kind of messed up and registered 135 services more than I should and I wanted to avoid deregistering the full device.

Also I am directly on the device with local service, I am not in remote in those commands (well I am in ssh but still in remoteit perspective).

Moreover, if I can add from cli why shouldn’t I be able to remove from the same interface?! And what does code 3000 mean so I can try to fix it?!

If your device is an older CLI that is not configurable, then you will need to SSH into that device and run the appropriate commands to delete the service.
First run the status command to get the list of registered services and service IDs. Please note, I am prefacing the commands with sudo for Linux. If this is a Windows computer, you will need to run as administrator and leave out the sudo part.

sudo remoteit status

You will not worry about the connections portion since you cannot make a connection back to your own service.
See attached screenshot


You can doublecheck your commands for service removal by running the following:

sudo remoteit help

In my case it is

sudo remoteit service remove --id <ID>

If you want to remove all of the services, like in your case where you have 135 and you do not want to run these commands 135 times, then you can start over and unregister the device, then add back the couple of services that you need. You must have run the command 135 times so you need to run it for each service.

sudo remoteit device unregister

Then Register. You do not want to restore, otherwise you will restore all of your services.

sudo remoteit device register

Then add back your services that you want.

FYI your syntax was wrong when you ran

sudo remoteit remove --id [...] 

I think you meant to add service before remove, but if you didn’t that is where you went wrong, this would produce error code 3000

The syntax should have been

sudo remoteit service remove --id [...]

So, first message is exactly what I wrote in my first post. As for sudo remoteit service remove --id [...] it does nothing. With verbose output, I get

remoteit service remove --id 90:00:00:00:00:13:6C:39 -v
~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~
remoteit agent START @ 2024-07-03T07:59:09Z
remoteit agent START args: remoteit service remove --id 90:00:00:00:00:13:6C:39 -v
remoteit agent STOP @ 2024-07-03T07:59:09Z
~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~

Also at the moment I am running the version 3.0.21, don’t know if I have to upgrade to use it

You are on a significantly older version of the CLI, but the service removing should work.
You can try upgrading the package, which is pretty easy.
You can follow the instructions here:

Instead of the registration code, you should use the restore code since it is for the same device.
You can find instructions to get the restore code here: Restore A Device
Let me know how it goes.