[UBUNTU] Fixed Error E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process xxxx (unattended-upgr)

When I ran a command sudo apt-get upgrade (apt upgrade) or sudo apt-get install (apt install ). I receive an error Solution

When I ran a command sudo apt-get upgrade (apt upgrade) or sudo apt-get install (apt install ). I receive an error Solution