LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

apt-install

Install packages from configured repositories.

TLDR

Install a package or update it to the latest version
$ sudo apt install [package]
copy
Display verbose version information during installation
$ sudo apt install -V [package]
copy
Install a specific version of a package
$ sudo apt install [package]=[version]
copy
Install without prompting for confirmation
$ sudo apt install -y [package]
copy
Reinstall an already installed package
$ sudo apt install --reinstall [package]
copy
Install without recommended packages
$ sudo apt install --no-install-recommends [package]
copy
Fix broken dependencies
$ sudo apt install -f
copy

SYNOPSIS

apt install [options] package...

DESCRIPTION

apt install is the standard command for installing packages on Debian-based distributions. It handles dependency resolution, downloads packages from configured repositories, and installs them on the system.If the specified package is already installed, the command will upgrade it to the latest available version. Multiple packages can be specified in a single command.

PARAMETERS

-y, --yes

Automatic yes to prompts; assume "yes" as answer to all prompts
-V, --verbose-versions
Show full versions for upgraded and installed packages
--reinstall
Reinstall packages even if they are already up-to-date
--no-install-recommends
Do not install recommended packages
-d, --download-only
Download packages but do not install them
-f, --fix-broken
Attempt to correct a system with broken dependencies
-s, --simulate
Simulate the install without making changes
--no-install-suggests
Do not install suggested packages

CONFIGURATION

/etc/apt/sources.list

Package source repositories.
/etc/apt/apt.conf
Main APT configuration file.
/etc/apt/apt.conf.d/
Directory for drop-in configuration fragments.

CAVEATS

Requires root privileges. The command may remove conflicting packages to satisfy dependencies. Use apt-get install in scripts for more stable output formatting.

SEE ALSO

apt(8), apt-get(8), apt-cache(8), dpkg(1)

Copied to clipboard
Kai