Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoracioDos/394369fd05b3ad04b4f415e0d62c997d to your computer and use it in GitHub Desktop.
Save HoracioDos/394369fd05b3ad04b4f415e0d62c997d to your computer and use it in GitHub Desktop.
Fix `Error: Timeout was reached ` when doing `apt-get update`
#!/bin/bash
# source: https://www.linuxquestions.org/questions/debian-26/apt-get-update-gets-stuck-while-reading-package-list-on-my-slug-795324/
mv /var/lib/dpkg/status /var/lib/dpkg/status.broken.bak
cp /var/lib/dpkg/status-old /var/lib/dpkg/status
rm -rf /var/lib/apt/lists/*
dpkg --configure -a
aptitude update
aptitude upgrade
aptitude install -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment