APT Advanced Package Tool Snippets
# Show information about a packageapt info <package># Show information about a package from cacheapt-cache show <package>
# Update, upgrade, and clean packages and orphaned dependenciessudo apt update && sudo apt upgrade -y && sudo apt autoremove -y# Optional upgrade apt flagged unsafe packagessudo aptitude safe-upgrade
# Install deb packagesudo dpkg -i /path/to/deb/filesudo apt-get install -f## orsudo apt install ./name.deb
# Combinedsudo apt update && sudo apt upgrade -y && sudo apt autoremove -y; sudo aptitude safe-upgrade -y
# List all repositories used or added to aptgrep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* > apt-repos.txtless apt-repos.txt
# Search for a packageapt search <package>
# List installed packagesapt list --installed
# Install a .deb filesudo dpkg -i <package>.deb
See Also
Section titled “See Also”Resources
Section titled “Resources”- See more usage at pacman/Rosetta which translates common package manager commands from pacman to other commands