{"tool":"apt","name":"APT","description":"Debian and Ubuntu’s package manager: install, update, search and remove software and inspect package sources.","tags":["packages","Debian","Ubuntu"],"homepage":"https://wiki.debian.org/Apt","docs":"https://manpages.debian.org/apt","related":["dnf","pacman"],"total_commands":20,"commands":[{"id":11,"category":"Installing","command":"sudo apt update","example":"sudo apt update","explanation":"Refreshes the package lists from the configured repositories. Run this before installing or upgrading."},{"id":12,"category":"Installing","command":"sudo apt install <package>","example":"sudo apt install nmap","explanation":"Installs a package and its dependencies."},{"id":13,"category":"Installing","command":"sudo apt install --no-install-recommends <package>","example":"sudo apt install --no-install-recommends ffuf","explanation":"Skips recommended extras to keep the system lean."},{"id":14,"category":"Installing","command":"sudo apt install ./<file>.deb","example":"sudo apt install ./tool_1.0_amd64.deb","explanation":"Installs a local .deb and resolves its dependencies."},{"id":15,"category":"Installing","command":"sudo apt reinstall <package>","example":"sudo apt reinstall openssh-server","explanation":"Reinstalls a package, restoring modified files."},{"id":16,"category":"Upgrading and removing","command":"sudo apt upgrade","example":"sudo apt upgrade","explanation":"Upgrades installed packages without removing any."},{"id":17,"category":"Upgrading and removing","command":"sudo apt full-upgrade","example":"sudo apt full-upgrade","explanation":"Upgrades and allows removals when dependencies change."},{"id":18,"category":"Upgrading and removing","command":"apt list --upgradable","example":"apt list --upgradable","explanation":"Shows pending upgrades."},{"id":19,"category":"Upgrading and removing","command":"sudo apt remove <package>","example":"sudo apt remove telnet","explanation":"Removes a package but keeps its configuration."},{"id":20,"category":"Upgrading and removing","command":"sudo apt purge <package>","example":"sudo apt purge apache2","explanation":"Removes a package and its configuration."},{"id":21,"category":"Upgrading and removing","command":"sudo apt autoremove","example":"sudo apt autoremove","explanation":"Removes dependencies no longer needed."},{"id":22,"category":"Querying","command":"apt search <term>","example":"apt search wordlist","explanation":"Searches package names and descriptions."},{"id":23,"category":"Querying","command":"apt show <package>","example":"apt show hashcat","explanation":"Version, size, dependencies and description."},{"id":24,"category":"Querying","command":"apt list --installed","example":"apt list --installed","explanation":"Every installed package."},{"id":25,"category":"Querying","command":"apt-cache policy <package>","example":"apt-cache policy openssl","explanation":"Installed and candidate versions and which repository each comes from."},{"id":26,"category":"Querying","command":"dpkg -L <package>","example":"dpkg -L openssh-server","explanation":"Files installed by a package."},{"id":27,"category":"Querying","command":"dpkg -S <path>","example":"dpkg -S /usr/bin/nc","explanation":"Which package owns a file."},{"id":28,"category":"Querying","command":"dpkg --verify","example":"dpkg --verify","explanation":"Reports installed files whose checksums no longer match the package — a quick integrity check after a compromise."},{"id":29,"category":"Holding","command":"sudo apt-mark hold <package>","example":"sudo apt-mark hold linux-image-generic","explanation":"Pins a package at its current version."},{"id":30,"category":"Holding","command":"apt-mark showmanual","example":"apt-mark showmanual","explanation":"Packages that were installed explicitly rather than as dependencies."}],"slug":"apt","category":"linux","url":"https://terminal.rokibulroni.com/tool/linux/apt","markdown":"https://terminal.rokibulroni.com/api/v1/tools/linux/apt.md"}