Remove wifi network from Network-Manager "never" connected

Tags:

Answer: 1

26 hours ago

How can I clean Nm from all the network ID I never get connected too ?

Traveling and moving here and there increase the list of net and I don't need many of them ... so I would like to clean all the network that I never connect too.

I wonder if there is a built in command to clean the list.

I'm not good with bash but I think it is easy to create script and so a cron job.

A good starting point could be nmcli tool and in particular those command:

  • nmcli con delete
  • nmcli con list
Added by: Christopher Parker

Answer: 2

11 hours ago

Solution

nmcli --fields UUID,TIMESTAMP-REAL con list | grep never |  awk '{print $1}' | while read line; do nmcli con delete uuid  $line;    done

On newer Ubuntu (15.10) use this command:

nmcli --fields UUID,TIMESTAMP-REAL con show | grep never |  awk '{print $1}' | while read line; do nmcli con delete uuid  $line;    done

It will be possibe also to use TIMESTAMP field to know how many day/month are passed from last connection, like for example we want to remove connection older than 1 year

Added by: Darien Dooley

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9