When to use apt
Use apt on Debian-family systems to inspect package availability and perform authorised package changes. Refreshing repository metadata and installing a package are different operations; inspect the proposed changes before confirming them.
Syntax
apt [PARAMETERS] ACTION [PACKAGE...]Square brackets mark optional arguments; an ellipsis means repetition. Replace example file names, user names and server addresses with your own values.
Common options and arguments
Usage examples
Find package
apt search tmuxMatching package names and descriptions are searched in available metadata.
View description
apt show tmuxPackage information is displayed to inspect its purpose and dependencies.
Update index and install package
sudo apt update
sudo apt install tmuxRepository metadata is refreshed and then the selected package is installed after the usual confirmations.
Notes and limitations
- Used in Debian, Ubuntu and compatible systems; update updates the index, not the installed packages.
- Before confirming installation or upgrade, check the changelog; for scripts usually choose apt-get and apt-cache.
Common questions and troubleshooting
Does apt update upgrade installed software?
It refreshes repository metadata; it does not itself perform a general upgrade. Installation and upgrade actions are separate.
Why can a package not be located?
Metadata may be stale, the repository may be disabled or the package may have a different name for this release. Check distribution and repository configuration.
Further help
Options vary by version and distribution. Check the installed documentation with this command: man apt.