Determine+a+Process+Holding+a+Lock+in+Linux

if you get and error like this: "debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable" then try to run the following command to determine which process is holding the lock and kill it.

fuser -v /var/cache/debconf/config.dat