# Advanced Package Tool (APT)

> The tool that adds and updates apps on Ubuntu. It fetches them for you.

**Field:** Infrastructure  
**Category:** Linux & the Command Line  
**Also known as:** apt, apt-get, apt install, apt update

## Think of it like

Think of it like an app store you talk to with words. You name the app, and it fetches it.

## Definition

APT is the package manager on Debian and Ubuntu. It installs, updates and removes apps with one command. apt update fetches the latest list of what is on offer. apt install then downloads a package and all it needs. apt upgrade brings each installed package up to date.

## Example

Emma sets up a new Ubuntu server. She runs sudo apt update, then sudo apt install nginx, and the web server is ready.

## Example code

```bash
sudo apt update
sudo apt install nginx
sudo apt upgrade
```

Fetch the latest list, then add one app. Last, bring all your apps up to date.

## Why it matters

It is how software gets onto and stays fresh on most Linux servers you will rent.

## Common mistake

Running apt install without apt update first. The old list may point to files that are gone.

## Three principles

- **Update the list.** apt update comes first.
- **Needs come too.** It installs what a package needs.
- **Upgrade often.** Fixes arrive as updates.

## Related terms

- [Debian Package (.deb)](https://learn.benibix.com/term/infrastructure/debian-package)
- [Unattended Upgrades](https://learn.benibix.com/term/infrastructure/unattended-upgrades)
- [sudo](https://learn.benibix.com/term/infrastructure/sudo)
- [Package Manager](https://learn.benibix.com/term/development/package-manager)
- [Ubuntu](https://learn.benibix.com/term/development/ubuntu)

## Taught in

- [APT and .deb Packages](https://learn.benibix.com/learn/infrastructure-linux/apt-and-deb-packages): Linux CLI, 7/10

![Three steps from left to right. First, apt update fetches a fresh list of packages from an online store of packages. Second, apt install downloads one .deb box and the boxes it needs. Third, the files are unpacked onto the server. Below, a box marked every day shows unattended upgrades running the same steps for security fixes.](https://learn.benibix.com/diagrams/inf3-apt.svg)

---

Source: https://learn.benibix.com/term/infrastructure/apt
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
