The apt
command is a powerful package management tool for Debian-based systems such as Ubuntu and Debian Linux. Here are some common apt
command examples:
- Update the package list:
sudo apt update
- Upgrade installed packages:
sudo apt upgrade
- Install a package:
sudo apt install package-name
- Remove a package:
sudo apt remove package-name
- Purge a package (removes configuration files as well):
sudo apt purge package-name
- Search for a package:
apt search package-name
- Show information about a package:
apt show package-name
- Get a list of installed packages:
apt list --installed
- Clean up cached packages:
sudo apt clean
These are some of the most commonly used apt
commands, but there are many more options and features available. To get a full list of available options and commands, you can use the man
command to view the apt
manual:
man apt