Last active
November 19, 2023 13:13
-
-
Save apolloclark/4c607fd09f52b7c02820 to your computer and use it in GitHub Desktop.
APT cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list repos | |
sudo apt-cache policy | |
# add repo | |
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ saucy universe multiverse" | |
# remove repo | |
sudo add-apt-repository --remove <ppa:whatever/ppa> | |
# list packages | |
dpkg --get-selections | grep -v deinstall | |
# list packages versions | |
sudo apt-cache policy <package_name> | |
# list packages, with updates | |
sudo apt-get -u upgrade | |
# upgrade, system | |
sudo apt-get dist-upgrade | |
# upgrade, all packages | |
sudo apt-get upgrade -y | |
# upgrade, one package | |
sudo apt-get install -y --only-upgrade <packagename> | |
# install package | |
sudo apt-get install -y <package_name> | |
# remove package | |
sudo apt-get purge -y <package_name> | |
# remove stale packages | |
sudo apt-get autoremove -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment