Skip to content

Instantly share code, notes, and snippets.

@StrixROX
Last active February 8, 2026 09:07
Show Gist options
  • Select an option

  • Save StrixROX/e3aa49bbf547356263b296768a792c2c to your computer and use it in GitHub Desktop.

Select an option

Save StrixROX/e3aa49bbf547356263b296768a792c2c to your computer and use it in GitHub Desktop.
Power cut while upgrading packages... now how to fix dpkg corrupted cache error

Forget everything about dpkg backups and stuff... rebuild the dpkg cache.

sudo rm /var/lib/dpkg/status
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo rm -rf /var/lib/apt/lists/*
sudo apt update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment