Skip to content

Instantly share code, notes, and snippets.

@dhensen
Created June 27, 2022 21:42
Show Gist options
  • Save dhensen/b538408c9748c8759e5c6292ef719572 to your computer and use it in GitHub Desktop.
Save dhensen/b538408c9748c8759e5c6292ef719572 to your computer and use it in GitHub Desktop.
Remove all nmcli connections except one
nmcli -f name connection show | grep -Ev 'Tatooine5G|NAME' | sed -e 's/[[:space:]]*$//' | tr '\n' '\0' | xargs -0 -n1 nmcli connection delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment