Ubuntu 18.04: Avoid “Could not get lock /var/lib/dpkg/lock” on boot

Table of Contents

1 Could not get lock /var/lib/dpkg/lock

This error will be caused because other process running dpkg operation like apt command.

$ sudo apt install -y package<snip>E: Could not get lock /var/lib/dpkg/lock – open (11: Resourcetemporarily unavailable)

2 Avoid “Could not get lock /var/lib/dpkg/lock”

So stop apt-daily and apt-daily-upgrade will avoid “Could not get lock /var/lib/dpkg/lock”.

$ sudo systemctl mask apt-daily.service$ sudo systemctl mask apt-daily.timer$ sudo systemctl mask apt-daily-upgrade.service$ sudo systemctl mask apt-daily-upgrade.timer

Android | Linux | SDL - Narrow Escape