You have to remove problematic local software lists and install updates by using commands below:

sudo rm -v /var/lib/dpkg/lock* /var/cache/apt/archives/lock
sudo rm -vrf /var/lib/apt/lists/*
sudo apt-get update

sudo apt-get dist-upgrade
sudo apt-get install -f -y
sudo dpkg --configure -a

To update Snaps use

sudo snap refresh