Search code examples
linuxdebianapt-getaptitude

I have accidentally removed apt-get and aptitude (Debian 6)


After I have removed libusb-0.1-4 packet, I tried to install a new one when I realized that I have also removed apt-get.

tbarry@darkstar:~$ sudo apt-get install libusb-1.0-0 sudo: apt-get: command not found tbarry@darkstar:~$ sudo aptitude install libusb-1.0-0 sudo: aptitude: command not found

could someone know how to reinstall apt without apt?


Solution

  • Download the apt...version.deb from https://packages.debian.org/search?keywords=apt and then install it via sudo dpkg -i /path/to/apt..version.deb. As long a dpkg is not removed everything is recoverable. Then install aptitude via apt-get.