Package / system tool

apt — Debian family

apt is used for package management or system administration in the Debian family. Consult the distribution manual for release-specific behaviour.

Availability: Debian and Ubuntu releases; package sources and privileges vary.中文

Syntax

apt [options] command

Examples

apt is used for package management or system administration in the Debian family. Consult the distribution manual for release-specific behaviour.

sudo apt update

Show command help and options where supported.

apt --help

Parameters, options and clauses

Option / clauseDescription
updateRefresh package indexes; this does not install upgrades.
install <package>Install a package and its dependencies.
remove / purge <package>Remove a package; purge also removes its configuration files.
-y, --assume-yesAnswer prompts automatically; inspect the proposed transaction first.
-s, --simulateShow planned actions without changing the system.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory