Vinari OS APT manual

Quick reference for common 'apt' commands on Vinari OS/Debian and derivatives.

What is apt?

The apt package manager is a high-level package management command-line tool for Debian-based Linux distributions. It provides an easy interface to install, remove, and manage packages using the APT (Advanced Package Tool) system.

Common commands

Command What it does
sudo apt update Refresh package index from configured repositories.
sudo apt upgrade Upgrade all upgradable packages to newest versions.
sudo apt install <package> Install a package (or multiple packages).
sudo apt remove <package> Remove package but keep configuration files.
sudo apt purge <package> Remove package and its configuration files.
sudo apt autoremove Remove automatically installed packages no longer needed.
apt search <term> Search package lists for <term>.
apt show <package> Show detailed information about a package.
apt list --installed List installed packages.
sudo apt clean Remove downloaded .deb files from cache (/var/cache/apt/archives).
sudo apt autoclean Remove only outdated package files from cache.

Examples

Update local package information and upgrade installed packages:

sudo apt update
sudo apt upgrade

Install packages (example installs curl and git):

sudo apt update
sudo apt install curl git

Remove a package but keep config files:

sudo apt remove package-name

Completely remove a package, including configuration files:

sudo apt purge package-name

Search for packages related to "vim":

apt search vim

Show details for a package (version, dependencies, description):

apt show vim

Options and useful flags

Best practices

Quick troubleshooting

If package operations fail due to broken dependencies or interrupted installs, try:

sudo dpkg --configure -a
sudo apt install -f
sudo apt update

Vinari OS

Send us an email

Copyright © 2017 - 2025 Vinari OS, Vinari Software, their names and logos are property of the Vinari Software Foundation.
Linux ® and Debian ® are registered trademarks of Linus Torvalds and Software in the Public Interest, Inc.
All the images and logos used in this site are property of their respective owners.