Debian based distibutions (Ubuntu, POP! OS, Mint) generally use apt
. However, we can also use dpkg
to perform some other tasks such as installing .deb files not sourced from a repo.
Command | Explanation |
---|---|
apt update |
Refreshes the sources and checks for available updates |
apt upgrade |
Updates packages identified for updates after running update |
apt autoremove |
Removes any orphaned and unneeded packages |
Command | Explanation |
---|---|
dpkg -i package.deb |
Installs local .deb |
dpkg -r package |
Removes package |
dpkg -l |
Lists installed packages, package version, architecture, and description (if available) |
Make a backup of the apt sources file
sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
Run the following command to create a new sources file
sudo echo "deb http://deb.debian.org/debian/ testing main contrib non-free" > /etc/apt/sources.list
Ensure apt is using the new source and packages are updated
sudo apt update && sudo apt upgrade -y
Upgrade the OS distribution to the "testing" branch
sudo apt dist-upgrade
Reboot the system for changes to take effect