20

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?

15

To delete a wifi connection type :

nmcli connection delete id <connection name>
| improve this answer | |
6

You can just type

nmcli connection delete CONNECTION_NAME
| improve this answer | |
0

nmcli connection will list all of the connections with both their name and GUID, making it easy to copy the Id into the delete command.

| improve this answer | |
New contributor
sqlsolver is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.