2

This is what I have in my network menu.

I've tried many workarounds from deleting entries to all that. Can you suggest any solutions?

JoKeR
  • 6,972
  • 9
  • 43
  • 65

3 Answers3

10

In a terminal, run

nmcli con

This will output something like this:

NAME                      UUID                                   TYPE              TIMESTAMP-REAL                    
Wired connection 1        67d66f2c-9a03-4298-8136-35933de5febe   802-3-ethernet    Wed 17 Jun 2015 17:00:08 BST      

this will list all your connections defined in NetworkManager

So now, pick the one you want to delete either by name or by uuid and run

nmcli con delete uuid 67d66f2c-9a03-4298-8136-35933de5febe

All the settings associated with that connection will be lost. But it will not clean your nm-applet menu.

You will need to logout/relogin or reboot for this to be visible in nm-applet menu

solsTiCe
  • 9,231
0

A safer option is the following, because the package is not uninstalled

Remove all configuration files of network-manager as superuser (put sudo before following command)

rm -rf /etc/NetworkManager/*

Then, recreate the configuration files (see How can I restore configuration files?)

sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" network-manager
jojo2000
  • 61
  • 1
  • 2
0

Purge and Re-Install Network Manager

Do this from the machine locally, and not via SSH or other remote means.

  1. Download the necessary package archives:

    dpkg-query -Wf '${Status;1} ${Package}\n' network-manager network-manager-* | awk '$1=="i" { print($2) }' | xargs apt-get download
    

    If you want to be extra thorough, save their Apt marks:

    apt-mark showauto network-manager network-manager-* | tee apt-mark-auto.txt
    
  2. Purge the packages:

    sudo apt-get purge network-manager network-manager-*
    
  3. Reinstall the from the previously downloaded package files:

    sudo dpkg -i network-manager*.deb
    

    If you saved the Apt marks earlier restore them with:

    xargs -a apt-mark-auto.txt -- sudo apt-mark auto
    
David Foerster
  • 36,264
  • 56
  • 94
  • 147
earthmeLon
  • 11,247
  • 10
    Have fun reinstalling it without a network. Even if its in memory if something goes wrong you are screwed. – kagronick Mar 21 '16 at 14:13
  • 2
    @kagronick, this answer could be enhanced to minimize the risk by downloading the target packages before purging: apt download $(apt-get remove -s --purge network-manager network-manager-* | awk '/Purg / { printf $2 " " }') , purge , then install them back using sudo dpkg -i network-manager* – user.dz Jul 08 '16 at 12:46
  • 1
    @user.dz: This downloads the package files after they were purged. Try dpkg-query -l network-manager network-manager-* | awk '/^ii/{print($2)}' | xargs apt download, the the commands shown in the answer. – David Foerster Jan 16 '18 at 12:22
  • @DavidFoerster , My command was for download only no effective purge. I used -s option for simulation or dry run. – user.dz Jan 16 '18 at 17:12