Post

dpkg remove broken installation using apt

dpkg remove broken installation using apt

When a dpkg install has gotten into a broken state that you can’t recover from, apt --fix-broken install is the nuclear option. It removes the broken package and cleans up the mess. I’ve needed this most often when an installation was interrupted midway through — power cut, connection drop, accidental Ctrl+C.

  • Trying to install software using .dpkg file
1
2
3
4
5
6
7
$ sudo dpkg -i some_software.dpkg

....
...
missing dependencies error
...

  • Use apt to remove the above broken installation (updated to use apt only)
1
$ sudo apt --fix-broken install
This post is licensed under CC BY 4.0 by the author.