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?
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?
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
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
Do this from the machine locally, and not via SSH or other remote means.
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
Purge the packages:
sudo apt-get purge network-manager network-manager-*
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
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
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
-s
option for simulation or dry run.
– user.dz
Jan 16 '18 at 17:12