Reinstalling packages on Debian and Ubuntu

My recent migration from Arch Linux to Debian (testing) has been an extremely
smooth one, but not without it’s issues.

A small issue I ran into early on was a problem with totem, the video app,
crapping out. While I’m not sure exactly what the heck went wrong, the quick fix
was to reinstall the package and call it a day.

I honestly couldn’t tell you the last time, assuming there was a last time, that
I had to forcibly reinstall a package on Debian or Ubuntu. In fact, solid chance
the last time I had to do this, I simply uninstalled and reinstalled the
package.

That’s no way to live, so after some research, I learned about the --reinstall
flag that tells apt install that it shouldn’t just skip the already installed
package and to try to installing it again:

sudo apt install --reinstall some-package

Obviously, this will work on Debian as well as Ubuntu as well as any
distributions that are based on those flavors.

Josh Sherman - The Man, The Myth, The Avatar

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.


If you found this article helpful, please consider buying me a coffee.