Terminal: sudo: apt-get: command not found

Lately some really bad things have been happening with my computer, having to do with lack of icons and all kinds of bad things going with my graphical interface. All the bad things in the appeal are accompanied by a certain disability of my terminal. I'm using 12.04 with Gnome Classic view with no effects.

Let's have a sudo apt-get update.

I get sudo: apt-get: command not found message. And it is the way it goes with all my apt-get commands.

What can it mean? How to fix this, especially concerning all the other problems I'm experiencing?


The short answer:

Re-install Ubuntu from a Live CD or USB.

The long version:

The long version would be a waste of your time: your system will never be clean, but if you insist you could try:

  • copying everything (missing) except for the /home folder from the Live CD/USB to your HDD.

OR

  • do a re-install/repair over the broken system again with the Live CD / USB stick.

OR

  • download the deb file for apt-get and install as explained on above posts.

I would definitely go for a fresh new install as there are so many things to do and so little time.


I faced the same issue regarding apt-get: command not found here are the steps how I resolved it on Ubuntu Xenial

  • Search the appropriate version of apt from here (apt_1.4_amd64.deb for ubuntu xenial)

  • Download the apt.deb

    wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.4_amd64.deb
    
  • Install the apt.deb package

    sudo dpkg -i apt_1.4_amd64.deb
    

Now we can easily run

sudo apt-get install <Package_Name>

If you are on aws ec2 use yum instead.

Source: https://stackoverflow.com/questions/14045262/how-to-fix-apt-get-command-not-found-on-aws-ec2