What is APT and how to install and update programs in Ubuntu?
Published on 2026-10-20 by frfrand
APT on Ubuntu and Debian explained: apt update, install, upgrade, repositories, dependencies and tips for updating servers without errors.

Short answer: APT is a set of package management tools used in Debian, Ubuntu and related distributions. It allows you to search, install, update and remove software using configured repositories.
Instead of browsing dozens of sites to download installers, you can ask the system to manage packages and their dependencies. This simplifies work on headless servers a lot.
What is a package?
A package contains files, version information and metadata needed to install software or system components.
Not every package is a program you open from a menu. Many are libraries, internal tools or parts of services used by other applications.
Dependencies are other packages a program needs to work. One of APT's important tasks is resolving those relationships when you install or update software.
What is a repository?
It is an organized source from which the system obtains information about packages and their versions. Ubuntu and Debian maintain official repositories, and there are also external sources.
The origin matters: adding an unknown repository may allow the system to install software maintained by third parties. It is not advisable to paste commands that add keys or sources without understanding what you are authorizing.
What does apt update do?
The command:
sudo apt update
updates the local information about available packages in the configured repositories.
This does not mean that all your programs have been updated. Only the lists and metadata necessary to know which versions exist have been consulted.
This difference explains why running only apt update does not automatically fix a vulnerability in an installed package.
What about apt upgrade?
sudo apt upgrade
attempts to update installed packages according to APT rules and the distribution.
Before confirming, review the list of proposed changes. On a production server, a library or service update may require testing, restarts, or a maintenance window.
Specific policies may vary between versions. There are also other APT operations to resolve updates that require dependency changes.
How to install Nginx?
A common sequence on Ubuntu would be:
sudo apt update
sudo apt install nginx
This installs the package offered by the configured sources. The available version may be different from the one announced on the project's official page.
This does not mean that a packaged version is necessarily insecure for not showing the most recent number: many distributions maintain security patches without changing the entire main version.
How to know where a package comes from?
Tools like apt show and apt policy help to consult details about packages, available versions, and repository priorities.
Before installing critical packages, check their origin and maintenance. In production applications, it may be preferable to use a supported and known version rather than mixing repositories without planning.
Are APT and dpkg the same?
No. dpkg is a low-level tool that manages local Debian packages. APT works on a higher layer and helps obtain packages from repositories and resolve dependencies.
It is possible to install a .deb file directly, but that does not imply that the system can resolve any dependency automatically in the same way as an installation managed with APT.
What errors should be avoided?
Updating a critical server blindly. First check backups, versions, and recovery procedures.
Mixing incompatible repositories. You may end up with conflicting libraries and applications that are difficult to maintain.
Running commands as root without reading them. Administrative permissions allow modifying practically the entire system.
Confusing updating packages with upgrading to a major version of Ubuntu. A full migration between operating system versions requires additional planning.
Where does ArduMaker fit in?
ArduMaker's VPS run Ubuntu, so APT is the package tool you will find in the terminal. With a nuance: what the ArduMaker app catalog offers (PostgreSQL, MySQL, Redis, n8n, Docker, WordPress or a GitHub repository) is best installed from the platform and not with apt install manually, because ArduMaker only lists, restarts and backs up what it installed itself. For the rest —a command-line tool, a system library— APT remains the way.
Installing or updating packages requires administrator permissions: a Company member logs in with their own Linux user, without root. Although the panel simplifies certain deployments, knowing APT helps understand what is installed on the server and how it is updated.
In summary: APT organizes package installation and updating. Its main advantage is not writing fewer commands, but working with sources and dependencies consistently.
Sources: Package management on Ubuntu Server · APT Manual · Debian vs Ubuntu.

Before updating Ubuntu in production
On a VPS hosting a website, sudo apt update updates the information about available packages, but does not install those updates. sudo apt upgrade can modify libraries and services used by your application. Review pending changes, have a recoverable backup, and then check the status of the process, the proxy, and the database.
If you manage the server in ArduMaker, schedule these tasks at an appropriate time, request a VPS backup outside the schedule beforehand (an administrator of the Company can do this), and note which Ubuntu version and packages each application uses. Do not confuse updating packages with automatically updating your project's code. A service may require a restart, and certain kernel patches require rebooting the system.
Frequently asked questions
What is the difference between apt and apt-get?
apt is the interface designed for interactive use: it shows progress bars and groups the most common operations. apt-get is the older tool with stable output, which is why it is still recommended for scripts and automations.
What does apt autoremove do?
It removes packages that were installed as dependencies of others and are no longer needed by anyone, for example after uninstalling a program or after a kernel update. Before confirming, read the list: if something you use appears there, mark it as manually installed with sudo apt-mark manual <package>.
Related: What is Ubuntu · What is a process in Linux.