APT Commands Cheat Sheet

Here is a cli commands cheat sheet for APT command, you can use this as a quick reminder for basic commands with a brief description for each of the commands.

What is APT command?

Add some data here

        ---
tags: [ packaging ]
---
# To find packages matching :
apt search 

# To show information on a package:
apt show 

# To fetch package list:
apt update

# To download and install the updates and (UNLIKE apt-get) install new necessary packages:
apt upgrade

# To download and install the updates AND install new necessary packages
# AND remove packages that stand in the way of the upgrade - use with caution!
apt dist-upgrade

# To perform a full system upgrade:
apt update && apt upgrade # use dist-upgrade carefully if needed

# To install package(s):
apt install ...

# To uninstall package(s):
apt remove ...

# To remove automatically all unused packages:
apt autoremove

# To list dependencies of a package:
apt depends ...

# To remove packages and delete their config files:
apt purge ...

# To list all packages installed
apt list --installed
    

Check out the APT command documentation .


You can also check our MegaSh cheatsheet tool, that has 150+ searchable linux cheat sheets in one page, so you never forget a command as you work again

Check Also

Best AI tools list