Apt packages


add repository for openjdk
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
add unattended
sudo add-apt-repository -y ppa:openjdk-r/ppa
sudp apt-get update

package info

list packages consisely
dpkg -l
find specific packages
apt-cache search [query]
get status information for package
dpkg -s openjdk-8-jdk
display available information on package
apt-cache show [package]
list files in package
dpkg -L [package]
installing a downloaded .deb package
sudo dpkg -i *.deb


update package list
sudo apt-get update
install package
sudo apt-get install openjdk-8-jdk
install unattended
sudo apt-get install -y openjdk-8-jdk
remove binaries for package
sudo apt-get remove [package]
remove binaries for package without asking confirmations
sudo apt-get remove -y [package]
remove all openjdk packages
sudo apt-get remove openjdk*
remove package including its configuration files
sudo apt-get purge [package]
remove packages that were only installed to satisfy dependencies and are no longer used
sudo apt-get autoremove
remove packages that are no longer relevant
sudo apt-get autoclean

security updates

list security Updates only
sudo unattended-upgrade --dry-run -d
apt-get -s dist-upgrade| grep "^Inst" | grep -i security
install security upgrades using apt-get
apt-get -s dist-upgrade | grep "^Inst" | grep -i securi | awk -F " " {'print $2'} | xargs apt-get install
install unattended upgrades to install security updates
sudo apt-get install unattended-upgrades
configure unattended upgrades to run automatically
sudo dpkg-reconfigure unattended-upgrades
install security updates once silently
sudo unattended-upgrades
install security updates once with output
sudo unattended-upgrades -d
simulate, but don't actually install
sudo unattended-upgrades --dry-run -d
unattended-updates log file
further reading