Reinstalling packages on Debian and Ubuntu

Josh Sherman
1 min read
Command-line Interface Debian / 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.

Join the Conversation

Good stuff? Want more?

Weekly emails about technology, development, and sometimes sauerkraut.

100% Fresh, Grade A Content, Never Spam.

About Josh

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

Currently Reading

Parasie Eve

Previous Reads

Buy Me a Coffee Become a Sponsor

Related Articles