cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar









Etc


Reference














.

os:linux:command:apt.html



Linux Command#Software

How to use apt Command in Debian/Ubuntu

Commands List

Installing Package

Command Objective Example
apt install PACKAGE
apt install -y PACKAGE
Performs the requested action on one or more packages specified via regex, glob or exact match.
apt -f install
apt install --just-print PACAGE Install test
apt update update is used to download package information from all configured sources.
apt upgrade upgrade is used to install available upgrades of all packages currently installed on the system
apt full-upgrade full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to
upgrade the system as a whole.
apt-get update   # Update list of packages 
apt-get upgrade  # Update installed packages 


Removing Package

Command Objective Example
apt remove PACKAGE
apt remove --purge PACKAGE
apt autoremove
apt autoclean
apt clean


Checking Package

Command Objective Example
apt search PATTERN apt search php
apt list PACKAGE apt list php
apt list --installed
apt list --upgradeable
apt show PACAGE
apt info PACAGE
Package Detail Infomation apt show php
apt info golang
echo "PACAKAGE hold" | dpkg --set-selections
echo "PACAGE install" | dpkg --set-selections
cat /var/log/apt/history.log







os/linux/command/apt.html.txt ยท Last modified: 2021/08/18 by admin

Page Tools