Could not get lock /var/lib/apt/lists/lock. It is held by process 22574 (aptd) N: Be aware that removing the lock file is not a solution and may break your system. code example
Example 1: how to fix could not fix var lock /var/lib/dpkg/lock ubuntu
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
Example 2: how to realse the lock in the linux in apt
sudo kill <process_id>