Skip to content

Instantly share code, notes, and snippets.

hrpatel hrpatel

  • Canada
Block or report user

Report or block hrpatel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hrpatel /
Created Dec 17, 2018
Disable service that updates apt packages daily
systemctl disable apt-daily.service
systemctl mask apt-daily.service
systemctl disable apt-daily-upgrade.service
systemctl mask apt-daily-upgrade.service
hrpatel /
Created Dec 17, 2018
Disable periodic activities of apt
cat <<EOF >/etc/apt/apt.conf.d/10disable-periodic
APT::Periodic::Enable "0";
# Do some stuff with apt/dpkg at boot
hrpatel /
Created Dec 17, 2018
Wait for apt/dpkg to finish
function wait_for_apt_deb {
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock &>/dev/null 2>&1; do
echo "Waiting for apt/dpkg lock to release, sleeping ${timeout}s"
sleep "${timeout}"
wait_for_deb && apt-get install vim
You can’t perform that action at this time.