I am trying to use nmcli to edit an existing connection and I would like to remove completely some properties (as opposed to just modifying their value).
Specifically the properties are wifi-sec.key-mgmt
and wifi-sec.psk
and the use case is because the network has been switched to open mode from wpa-psk mode.
I can't seem to find a way to delete these properties, and the nmcli help seems to point to the command nmcli connection modify
but it doesn't seem to have the ability to delete entire properties, just delete some items in multi-value properties, which is not the case for the ones I want.
Usage: nmcli connection modify { ARGUMENTS | help }
ARGUMENTS := [id | uuid | path] <ID> ([+|-]<setting>.<property> <value>)+
Modify one or more properties of the connection profile.
The profile is identified by its name, UUID or D-Bus path. For multi-valued
properties you can use optional '+' or '-' prefix to the property name.
The '+' sign allows appending items instead of overwriting the whole value.
The '-' sign allows removing selected items instead of the whole value.
Is there any way to completely remove a property via nmcli or do I have to delete the whole connection and then re-create it without these properties ?
Note that this needs to be invoked from another program, so interactive mode commands are not suitable.