apt-get install not working [E: Read error - read (5: Input/output error)]

I have an old problem (since a week) with apt-get which prevents me from installing and upgrading packages. I have Ubuntu 16.04.

I am receiving this message on the top bar:

Error: opening the cache (E: Read error - read (5: Input/output error))

When I type on the terminal: sudo apt-get update, nothing goes wrong and it was completed successfully.

However, when I type sudo apt-get upgrade or sudo apt get install , I get this output:

Reading package lists...    
Done Building dependency tree           
Reading state information... Error! E: Read error - read (5: Input/output error)

I have tried to delete the /var/lib/dpkg/status file and then update, but nothing change!


Try this please as a last possible solution. Open a terminal and type these commands:

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update

If this doesn't work either, then the hard disk problem is the most probable cause for this message unfortunately.


This read/input-output error indicates serious disk failure!

Back up all important data immediately and look for a new hard disk.


You can find out more details about your disk health by checking its S.M.A.R.T. status.

Open gnome-disks, select your HDD in the device list on the left and click the hamburger menu in the top right corner. Chose SMART Data & Self-Tests to view the information.