Q:

Ubuntu update error " waiting for unattended-upgr to exit "

I'm unable to update my system having 2 installations of Ubuntu , one is version 16.04 & the other version is 17.04. In both, I'm getting the same error.
For ex., in Ubuntu 16.04, I run software updater & get the result as shown below.

I did wait for some time but the updater didn't proceed ahead.
Then I pressed Stop button and it took me to the below pop-up.

Then I pressed the button Install now & it took me to the next pop-up as shown below.

I waited here for some time but it got stuck there.
I'm unable to update in either installation.
What is the solution as I can't do any update?
(Also would like the viewer to see if unauthorized tampering, remotely or otherwise, can result this error. If so, how to solve the issue?)
If I fail to update, I may be compelled to take the trouble of reinstalling both the installations from scratch which any how I would like to avoid.

EDIT

With ref. to the 3rd picture above that mentioned "installing updates", it did proceed ahead & updated completely. But after rebooting & running again the software updater, I came across a new issue. Now on running the software updater, it messages check your Internet connection. I've posted the Q here.

A:

I would first try a softer way. 

Stop the automatic updater.
sudo dpkg-reconfigure -plow unattended-upgrades

At the first prompt, choose not to download and install updates.
Make a reboot. 
Make sure any packages in an unclean state are installed correctly.
sudo dpkg --configure -a

Get your system up-top-date.
sudo apt update && sudo apt -f install && sudo apt full-upgrade

Turn the automatic updater back on, now that the blockage is cleared.
sudo dpkg-reconfigure -plow unattended-upgrades

Select the package unattended-upgrades again.

A:

I simply copy-pasted a solution from another question on Ask Ubuntu, “Unable to lock the administration directory (/var/lib/dpkg/) is another process using it”. All the credit goes to zurdo.

This should be used as last resort. If you use this carelessly you can end up with a broken system. Please try the other answers before doing this.
You can delete the lock file with the following command:
sudo rm /var/lib/apt/lists/lock

You may also need to delete the lock file in the cache directory
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

After this you should be able to do your updates!

