Could not get lock /var/lib/apt/lists/lock - debian 10.6 code example
Example 1: apt lock
rm -rf /var/cache/apt/* /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend \
/var/cache/debconf/ /var/lib/apt/lists/* \
/var/lib/dpkg/lock /var/lib/dpkg/lock-frontend /var/cache/debconf/
Example 2: how to realse the lock in the linux in apt
sudo kill <process_id>