A package install I was doing got interrupted and when I tried to remove it I got the following error.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?.
To fix I found out what process was using the lock
sudo lsof /var/lib/dpkg/lock
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME dpkg 9442 root 3uW REG 179,2 0 7067 /var/lib/dpkg/lock
And then killed it off
sudo kill -9 9442