I have accidentally removed apt-get, how do I reinstall it?
$ sudo apt-get update
sudo: apt-get: command not found
$ sudo dpkg-reconfigure apt
/usr/sbin/dpkg-reconfigure: apt is broken or not fully installed I would like to mention I do not want to reinstall Linux!
63 Answers
I'm not sure what happened with your apt-get, but if you're unable to use it, you might want to use apt from Ubuntu repositories (simply downloading and installing via sudo dpkg -i package_name)
the functionality of apt is pretty much similar to what you get with apt-get.
9Assuming that your apt-get seriously needs a reinstall, you can try following:
- Check your current apt-get version by
apt-get --version. - Search for the same version's .deb file on launchpad.net
- install it by
dpkg -i filename.deb - Of course, this unfortunately cannot work if you also removed the packeges on which apt depends, like libgcc1
Try installing synaptic from the command line, and see if you can't reinstall apt that way.
From a terminal window, type in the following:
wget then install the downloaded package:
sudo dpkg -i synaptic_0.84.2_amd64.debthen run the installed app:
sudo synapticIn the quick search, type in apt and select it for install.