How to Fix Broken Packages on Ubuntu 16.04 and Debian 9

Ubuntu and Debian both use packages to add to the system’s capabilities, allowing users to do more with their machines. However, as great as this package system is, things can still break. Whether it’s a bad install, a bad configuration, or if something externally modified the files after installation, packages can sometimes go wrong and not work anymore, making them ???broken???.