Gentoo Background

Ubuntu Linux APT Package Management

Enhance your Ubuntu Linux experience with this comprehensive guide to APT package management. Discover efficient techniques for updating, upgrading, installing, removing, and managing packages on your Ubuntu system. Master advanced APT commands and optimize your package management workflow effortlessly. !!! Example "Fix Broken install packages"
apt --fix-broken install
!!! Example "Fix missing confiugration after manually deleted a folder"
apt-get purge --auto-remove syslog-ng -y
apt-get install --reinstall syslog-ng -y
!!! Example "Update and Upgrade Packages"
apt update
apt upgrade
!!! Example "Search for Packages"
apt search <package>
!!! Example "Install a Package"
apt install <package_name>
!!! Example "Remove a Package"
apt remove <package_name>
!!! Example "Purge a Package (Remove with Configuration Files)"
apt purge <package_name>
!!! Example "Search for Packages by Name"
apt search <package_name>
!!! Example "Show Package Information"
apt show <package_name>
!!! Example "List Installed Packages"
apt list --installed
!!! Example "List Upgradable Packages"
apt list --upgradable
!!! Example "Check for Broken Dependencies"
apt check
!!! Example "Autoremove Unused Packages"
apt autoremove
!!! Example "Clean Downloaded Package Files"
apt clean
!!! Example "Clean and Remove Cached Package Files"
apt autoclean
!!! Example "View the Package Repository Sources"
cat /etc/apt/sources.list
!!! Example "Add a Repository"
add-apt-repository <repository_url>
!!! Example "Remove a Repository"
add-apt-repository --remove <repository_url>
!!! Example "Upgrade Installed Packages"
apt upgrade
!!! Example "Full System Upgrade (Distro Upgrade)"
apt dist-upgrade
!!! Example "Check for Held Back Packages"
apt-mark showhold
!!! Example "Hold a Package to Prevent Upgrades"
apt-mark hold <package_name>
!!! Example "Unhold a Held Package"
apt-mark unhold <package_name>
!!! Example "Find which Package Provides a File"
apt-file search <file_name>
!!! Example "Install `apt-file` (if not already installed)"
apt install apt-file
apt-file update
!!! Example "Check the Version of Installed Packages"
dpkg -l | grep <package_name>
!!! Example "Reconfigure an Installed Package"
dpkg-reconfigure <package_name>
!!! Example "Check Available Package Updates"
apt list --upgradable
!!! Example "Install Security Updates Only"
unattended-upgrades --dry-run --debug
!!! Example "Lock/Unlock a Package Version"
apt-mark hold <package_name>
apt-mark unhold <package_name>
!!! Example "Show Package Dependencies"
apt-cache depends <package_name>
!!! Example "View APT History"
cat /var/log/apt/history.log
!!! Example "Install Useful Packages"
apt-get install -qqy apt aptitude pigz unrar unzip p7zip-full xz-utils parallel binwalk build-essential \
cmake make autoconf automake pkg-config libssl-dev git tcl tcllib apache2 mysql-server libmysqlclient-dev \
python3 python3-pip perl rustc g++ golang-go maven lua5.3 liblua5.3-dev openssh-server sshfs vim nano \
libgtk-3-dev binutils gcc-multilib gdb debootstrap schroot libjson-c-dev libyaml-dev libxml2-dev \
libpcre3-dev libsqlite3-dev libpq-dev libncurses5-dev libevent-dev libreadline-dev libglib2.0-dev \
libsqlite3-dev lftp ftp npm nodejs gnutls-dev libgnutls30 libgnutls-openssl-dev libfuse-dev apktool \
android-sdk default-jre default-jdk openjdk-11-jre openjdk-11-jdk libssl-dev software-properties-common \
python3-software-properties ssmtp mailutils cryptsetup aespipe ca-certificates gnupg adb fastboot \
iperf3 pciutils lsof strace libapache2-mod-php net-tools docker-compose syslog-ng figlet \
inxi dropbear-initramfs initramfs-tools busybox meson ninja-build squashfuse squashfs-tools-ng \ 
squashfs-tools squashfs-mount translate-shell shellcheck screen ripgrep tcl-dev