What is APT and how to install and update programs in Ubuntu?
Published on 2026-10-20 by frfrand
APT en Ubuntu y Debian explicado: apt update, install, upgrade, repositorios, dependencias y consejos para actualizar servidores sin errores.

APT is a package management toolset 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 greatly simplifies work on headless servers.
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 function. 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 external sources also exist.
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 local information about packages available in the configured repositories.
It doesn't mean that all your programs have been updated. Only the necessary lists and metadata have been consulted to find out which versions exist.
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
That installs the package offered by the configured sources. The available version may differ from the one announced on the project's official page.
It doesn't 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 almost the entire system.
Confusing package updates with upgrading to a major version of Ubuntu. A full migration between operating system versions requires additional planning.
Where does ArduMaker fit in?
Linux VPS managed from ArduMaker can use package tools from their distribution to install and maintain services. 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 coherently.
Sources: Package management on Ubuntu Server · APT Manual · Debian vs Ubuntu.
