How do you use nmcli to delete a wifi connection by name?

From what I've read, it only allows deletion via UUID:

nmcli connection delete <uuid>

The simplest way I've found to delete by name is to lookup the UUID from the name and pass that in:

nmcli con delete `nmcli --fields NAME,UUID con list | grep -i mynetworkname | awk '{print $2}'`

Is there a simpler way?


To delete a wifi connection type :

nmcli connection delete id <connection name>

In addition to the solution by GAD3R, you can also just type:

nmcli connection delete CONNECTION_NAME

(I know this is 2 years old, but it was the first result on google)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.