Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Unfortunately, I uninstalled network-manager-gnome using sudo apt-get remove --purge network-manager. I was trying to reinstall it from but without internet connection I cannot do so. What is the solution for this?

share|improve this question
do you have access to other machines with same OS of this machine? –  Maythux Feb 19 '14 at 5:37

4 Answers 4

If you've recently upgraded your network manager you can use "sudo apt-get install --reinstall network-manager", but this only works if the package is still in your apt cache. I'm guessing you haven't so you'll have to do things the long way, but I thought I'd throw that in just in case.

Step #1 = Boot an ubuntu livecd in "try without installing". (Make sure you are connected to the internet.)

Step #2 = In terminal type "sudo mount --bind /dev /chrootlocation/dev". (you will need to replace "chrootlocation" with the appropriate location of your ubuntu install, typically the label of the partition it's installed on. The partition must also be mounted so that you can access it.)

Step #3 = In terminal type "sudo mount --bind /proc /chrootlocation/proc".

Step #4 = In terminal type "sudo mount --bind /sys /chrootlocation/sys".

Step #5 = In terminal type "sudo cp /etc/resolv.conf /chrootlocation/etc/resolv.conf".

Step #6 = In terminal type "sudo chroot /chrootlocation".

Step #7 = In terminal type "sudo apt-get update". (If you don't you'll likely get an unable to connect error.)

Step #8 = In terminal type "sudo apt-get install network-manager".

Step #9 = In terminal type "exit". (This exits you from the chroot)

Step #10 = In terminal type "sudo reboot".

share|improve this answer
there needs an internet connection for sudo apt-get update command. –  Avinash Raj Feb 19 '14 at 5:07
there would be in the chroot. the reason he has no internet is because he uninstalled the network manager, the livecd will have network manager installed so he can use that to connect and install to the other ubuntu installation. –  mango Feb 19 '14 at 5:08
The way I read the question is that the user is on a computer that is normally connected to the internet, but because he uninstalled the network-manager he's currently unable to connect to the internet. Using a livecd get's around this issue. Quote: "I was trying to reinstall it from but without internet connection i cannot do so". Perhaps I've read it wrong? –  mango Feb 19 '14 at 5:17
Also bind the run directory, otherwise you will probably be getting unable to resolve hostname errors: sudo mount --bind /run /chrootlocation/run –  Dziamid Mar 17 at 11:08
This didn't work for me - although the live CD has access to the network, as soon as I chroot the network access (for the chrooted command line) vanishes. –  Logan Pickup Aug 5 at 3:18

My previous answer assumes that the reason you cannot access the internet is because you uninstalled "network-manager", and that normally the computer is connnected to the internet. However on the off chance that I read your question wrong, and this is in fact a computer that isn't ever connected to the internet you will need to use this answer instead though it will be more time consuming.

Step #1 = On another computer (It can be running Windows, doesn't matter), go to "". (This link assumes you are using Ubuntu 12.04, if not you will need to find the link appropriate to your version).

Step #2 = At the bottom of the web page there is a link for "amd64" and "i386", click on the approriate one. I'm using amd64 so my steps will assume that.

Step #3 = On the new page there are a bunch of mirror links that are direct download links for "network-manager_0.9.4.0-0ubuntu3_amd64.deb". Pick a link, and download the .deb file.

Step #4 = On the first url I provided it also lists the dependencies for network-manager. You may have some of these still installed, but for the ones you don't you will need to download them as well by visiting their page and selecting a mirror.

Step #5 = Once you've downloaded all the .debs you will be needing transfer them to the Ubuntu computer and put them in "/var/cache/apt/archives". You will need root privileges to do this which can be achieved with "gksu nautilus /var/cache/apt/archives". You could also use dpkg to install them, but it won't tell if you've forgetten a dependency so I'm not going to get into how to use that.

Step #6 = In terminal type "sudo apt-get install --reinstall network-manager".

share|improve this answer
sudo apt-get remove --purge network-manager

The above command will purge all the packages that was related to the service network-manager.You can download all packages as .deb file using a Ubuntu Live disk and then install it to your original OS.

  • First boot from a Ubuntu Live disk.

  • Once you go there open a terminal and run the below command,

    sudo apt-get download network-manager*
  • This will download all the network-manager packages to the home directory.

  • Now copy all the .deb packages to a folder in that pen drive or other partitions in your HDD and then reboot to your system.

  • Once you go there open terminal and do the following:

    cd /path/to/the/directory/where/.deb/files/are/located
    sudo dpkg -i *.deb
  • The above command will install all the .deb files.

  • Now restart your network-manager by running sudo service network-manager restart

Now you have the package network-manager-gnome running again.

share|improve this answer
The OP has asked for a solution where he can do this without access to internet. –  i08in Feb 19 '14 at 9:28
The OP has no Internet due to the removing of the network-manager-gnome package, but this doesn't mean that he has no Internet. Also be aware that using Live CD will not rely on the host package so he'll get access to Internet –  Maythux Feb 19 '14 at 10:29
Remove network-manager, now how connect to download packages? :-/ thanks for the additional problem. –  WHK Jan 30 at 17:43

Take a look at nm-applet crash In UBUNTU 13.04 (Raring) and 13.10 (Saucy) and a simple fix . Although it gets quite technical, it may point you in right course.

You need to use command line because what you have deleted is only GUI. Core program should still be there.


$ nmcli dev

You may see something like this (from the cited link):

DEVICE     TYPE              STATE        
ttyUSB0    cdma              disconnected    
wlan0      802-11-wireless   disconnected 
eth0       802-3-ethernet    unavailable 


$ nmcli con

That should give information like this (from cited link):

NAME                      UUID                                   TYPE              TIMESTAMP-REAL                    
VPN connection 1          de9fd222-7a27-4e29-ad9e-9095f953e837   vpn               never                             
LAN                       c26d0089-0f41-422a-9997-8a9b832d7159   802-3-ethernet    Saturday 26 October 2013 07:23:48 PM IST
Tata Indicom (Photon+) connection b3c0f820-7521-4eb4-8507-8c931f44d691   cdma              Tuesday 29 October 2013 04:25:28 PM IST

Then run:

$ nmcli con up b3c0f820-7521-4eb4-8507-8c931f44d691

after replacing that device_id with the device_id for your connection. If that doesn't work you can try what works for me (on my system which is 13.10):

$ nmcli con up id "DSL connection 1"

Notice it is slightly different and that quotes are needed because of spaces in DSL connection 1.

Just to add that you may also have copy of network-manager-gnome in /var/cache/apt/archives and you may just be able to run:

$ sudo apt-get install network-manager-gnome 

I don't know for sure but worth a try! Of course if you also ran sudo apt-get clean or sudo apt-get autoclean then chances of using the cache are zero.

share|improve this answer
i tried,for mine there was no network-manager-gnome package is in /var/cache/apt/archives.Did you tried? –  Avinash Raj Feb 19 '14 at 5:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.