[tag] How to delete a tag with no notes attached to it by joplin terminal?

The document said:

tag <tag-command> [tag] [note]
<tag-command> can be "add", "remove" or "list" to assign or remove [tag]
from [note], or to list the notes associated with [tag].

So if I use a tag command without a note name

joplin tag remove tag_name

Joplin terminal would report error of:

Cannot find "undefined".

The desktop version is OK with this feature.

Even with the tag Id ?

I think that as the command is tied to a note, it’s not possible.

How to see or get this tag id?

tag list

tg1
tg2
To delete a tag, untag the associated notes.

tag list -l

tg1
tg2