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
-y— assume yes to prompts (e.g.,sudo apt install -y package).-sor--simulate— simulate actions without making changes (apt -s upgrade).--fix-broken— try to fix dependency problems (sudo apt install --fix-broken).--show-progress— show progress bars on some operations (often default in interactive terminals).
Best practices
- Run
sudo apt updatebefore installing or upgrading so you have the latest package lists. - Use
sudo apt upgradefor regular upgrades; usesudo apt full-upgradeonly when you understand it may remove packages to resolve dependencies. - Use
sudo apt autoremoveperiodically to clear orphaned dependencies. - Be careful with third-party PPAs and unsigned repositories — they can affect system stability.
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
