Ubuntu 19.04 problems install upgrades

I would suggest the following:

Option # 1:

Try fixing the missing packages by running the following command in the terminal:

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

If errors are encountered, try removing the the apt lock by running the following in the terminal:

sudo rm /var/lib/apt/lists/lock

Then:

sudo rm /var/cache/apt/archives/lock

Then run the command again:

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

If this does not solve the problem, please move to option # 2 below.

Option # 2:

To attempt to repair broken packages in the recovery mode, please follow these steps ( It is advised to connect your machine to Internet via Ethernet cable before you start ):

  1. Reboot your system.

  2. Hold the Shift key as soon as you pass the BIOS logo to enter the GRUB boot menu. You might need to repeat steps 1 and 2 a few times before you finally succeed.

  3. Once you see the options screen, select Advanced options for Ubuntu and press Enter:

    enter image description here

  4. In the next screen select the second line (the on with recovery mode) and press Enter:

    enter image description here

  5. Wait for the initial boot process to finish and a second screen with options appears. Select Enable networking and press Enter:

    enter image description here

  6. If presented with a yes/no screen, choose yes and press Enter:

    enter image description here

  7. If all goes well, you should be now connected to the Internet. You will know if it succeeds when the options screen shows up again. Now select Repair broken packages and press Enter:

    enter image description here

  8. If presented with a yes/no screen, choose yes and press Enter:

    enter image description here

  9. When you see at the command prompt Do you want to continue? type Y and press Enter:

    enter image description here

  10. If all goes well, the options screen will show up again:

    enter image description here

  11. Reboot your machine.