All tags
apt
Narrow down
Shell29
- Tip
sudo apt-mark minimize-manualapt-mark minimize-manual marks metapackage dependencies as automaticLets apt autoremove clean up dependencies of metapackages that were once marked manual.3 Dec 2026 - Tip
sudo nano /etc/apt/apt.conf.d/52unattended-upgrades-localunattended-upgrades can skip chosen packages with Package-BlacklistKeep automatic updates on while a few sensitive packages wait for you.1 Dec 2026 - Tip
sudo apt install ppa-purgeppa-purge takes an Ubuntu system back to the official packagesRemove an extra PPA and downgrade what came from it.1 Dec 2026 - Tip
grep -E ' (install|upgrade|remove) ' /var/log/dpkg.log | tail/var/log/dpkg.log records every package change, even ones apt did not makeLists each install, upgrade and removal at dpkg level with versions and times.30 Nov 2026 - Tip
sudo apt-get -d -y full-upgradeapt-get -d upgrade downloads everything first, so the real upgrade is quickFetches all upgrade packages ahead of time without installing anything.30 Nov 2026 - Tip
sudo apt-get -s install chrony systemd-timesyncd-A minus after a package name lets apt-get install and remove in one goSwaps one package for another in a single apt transaction.30 Nov 2026 - Tip
sudo apt-mark auto build-essential libssl-devapt-mark auto lets apt autoremove clean up packages you no longer needMarks packages as dependencies so autoremove can remove them when nothing needs them.30 Nov 2026 - Tip
sudo dpkg-reconfigure tzdatadpkg-reconfigure asks a package's apt install questions againReruns the setup questions of an installed package, like time zone or locale.30 Nov 2026 - Tip
sudo apt-get -s autocleanapt-get autoclean keeps the cache but drops .deb files that are out of dateRemoves only cached package files that can no longer be downloaded.30 Nov 2026 - Tip
sudo apt -o Acquire::ForceIPv4=true updateAcquire::ForceIPv4 fixes apt update when it hangs on a broken IPv6 routeMakes apt download over IPv4 only when IPv6 connections stall.30 Nov 2026 - Tip
sudo install -d -m 0755 /etc/apt/keyringsSigned-By ties an apt repository to its own key instead of trusting it for everythingLimits a third party key so it can only sign its own repository.30 Nov 2026 - Tip
sudo apt-get checkapt-get check finds broken dependencies, and apt install -f repairs themDiagnoses and fixes a package system left with unmet dependencies.30 Nov 2026 - Tip
sudo less /var/log/apt/term.log/var/log/apt/term.log keeps the full apt output, error messages includedShows the full terminal output of past apt runs, including install script errors.30 Nov 2026 - Tip
sudo apt install needrestartNeedrestart tells you which services still run old libraries after an upgradeLists services that still use outdated libraries after package upgrades.28 Nov 2026 - Tip
sudo apt-get satisfy "libssl-dev (>= 3.0)" "pkg-config"apt-get satisfy installs whatever a dependency string asks forInstalls packages from a dependency line with version constraints, and can remove conflicting ones.28 Nov 2026 - Tip
sudo apt-get install --only-upgrade nginxapt-get install --only-upgrade updates one package and never installs it newUpgrades a named package only if it is already installed, and never installs it as new.28 Nov 2026 - Tip
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.Dpkg --configure -a finishes an install that was cut offFinishes the setup of packages left half installed after an interrupted apt run.27 Nov 2026 - Tip
sudo update-alternatives --config editorupdate-alternatives --config editor picks the editor Ubuntu opensChanges which program Ubuntu starts as the default editor, or any other alternative.27 Nov 2026 - Tip
sudo debsums -cDebsums -c lists Debian package files that no longer match their checksumsShows which installed package files on Debian or Ubuntu were modified since install.26 Nov 2026 - Tip
sudo apt cleanApt clean empties the cache of downloaded .deb filesDeletes cached package downloads to free disk space on the system.24 Nov 2026 - Tip
sudo apt install --reinstall coreutilsApt install --reinstall brings back files you deleted by mistakeReinstalls a package and restores config files that were deleted.24 Nov 2026 - Tip
sudo apt install ./vendor-tool_2.1_amd64.debApt install ./file.deb installs a local package and resolves its dependenciesInstalls a downloaded .deb file and pulls in the dependencies it needs.24 Nov 2026 - Tip
dpkg -L nginx-common | grep etcdpkg -L lists every file an apt package put on your systemLists all the files that an installed package has put on disk.24 Nov 2026 - Tip
sudo apt install apt-fileapt-file search finds the apt package that ships a missing fileFinds which package provides a file, even when that package is not installed.24 Nov 2026 - Tip
sudo apt upgradeApt full-upgrade can remove packages that apt upgrade never removesLets apt install or remove packages to finish upgrades that are kept back.24 Nov 2026 - Tip
sudo unattended-upgrade -v --dry-runDo a dry run before you trust unattended-upgradesSimulates an automatic update run and shows what it would install without changing anything.18 Sep 2026 - Tip
sudo apt autoremove --purgeApt autoremove --purge also deletes the leftover config filesRemoves unused dependency packages together with their leftover configuration files.11 Jul 2026 - Tip
sudo apt install --no-install-recommends–no-install-recommends stops apt from dragging in extrasInstalls a package with only its required dependencies and skips the merely recommended ones.24 Jun 2026 - Tip
sudo apt-mark hold postgresql-16apt-mark hold keeps one package on the version you haveFreezes one package at its current version while everything else keeps updating.9 Jun 2026
Other tips22
- Tip
dpkg --get-selections > packages.txtdpkg --get-selections rebuilds your package set on a new machineSaves the installed package list so another machine can install the same set.3 Dec 2026 - Tip
dpkg --compare-versions 1.10 gt 1.9 && echo newerdpkg --compare-versions tells a script which version is newerCompares two Debian version strings and answers with the exit code.3 Dec 2026 - Tip
Unattended-Upgrade::InstallOnShutdown "true";InstallOnShutdown moves unattended-upgrades to the moment you power offInstalls the updates during shutdown instead of in the background.3 Dec 2026 - Tip
apt-cache policyunattended-upgrades updates a third party repository with Origins-PatternInclude packages from an extra repository in your automatic updates.1 Dec 2026 - Tip
Unattended-Upgrade::Mail "[email protected]";unattended-upgrades can mail you only when something goes wrongHear about failed automatic updates without a daily message.1 Dec 2026 - Tip
-o Dpkg::Options::="--force-confold" upgradeApt with force-confold keeps your edited config files in unattended upgradesStops apt from asking about changed config files during scripted upgrades.30 Nov 2026 - Tip
apt-cache search --names-only zstdapt-cache search -n finds a package by its name, without the noiseSearches package names only, so results don't drown in description matches.30 Nov 2026 - Tip
pro security-statuspro security-status shows which packages get Ubuntu security updates and which don'tCounts your installed packages by where their security updates come from.30 Nov 2026 - Tip
apt list '~o'apt list '~o' finds installed packages that no repository offers anymoreLists packages that no longer exist in any configured repository, so they get no updates.30 Nov 2026 - Tip
apt policy openssh-serverapt holds back some Ubuntu updates on purpose because of phased updatesExplains the deferred due to phasing message and when to override it.30 Nov 2026 - Tip
apt-config dump | lessapt-config dump shows the apt settings that are really in effectPrints the merged configuration from every file in apt.conf.d.30 Nov 2026 - Tip
Types: debApt .sources files are deb822 now, and Enabled: no switches one offShows the newer repository format and how to disable a source cleanly.30 Nov 2026 - Tip
dpkg-query -W -f='${Package}\t${Version}\n' 'openssh-*'dpkg-query -W -f prints exactly the package fields you ask forPrints chosen fields of installed packages, such as name and version, in a format scripts can read.28 Nov 2026 - Tip
less /var/log/apt/history.log/var/log/apt/history.log shows what apt installed and whenShows which packages apt installed, upgraded or removed, on which date and by which command.27 Nov 2026 - Tip
apt -s full-upgradeapt -s runs a simulated install or upgrade and changes nothingShows what an install or upgrade would do without changing the system.24 Nov 2026 - Tip
apt-mark showmanual > packages.txtapt-mark showmanual lists what you installed yourselfPrints the packages you installed on purpose, which makes rebuilds easier.24 Nov 2026 - Tip
Pin: version 1.24.*Apt pinning in preferences.d locks a package to one version rangeTells apt which version of a package to prefer, and keeps it there.24 Nov 2026 - Tip
apt-cache rdepends --installed libssl3apt-cache rdepends shows what needs a package before apt removes itLists installed packages that depend on a given package.24 Nov 2026 - Tip
apt changelog openssh-serverapt changelog shows why a package wants to updateShows the maintainers' notes for a package so you know what an update actually changes.4 Jul 2026 - Tip
apt list --upgradableapt list --upgradable shows what is waiting before you upgradeLists the packages that have a newer version available without installing anything.2 Jun 2026 - Tip
apt download htopapt download fetches a .deb without installing itSaves a package as a .deb file in the current directory without installing it.9 May 2026 - Tip
apt-mark showholdapt-mark showhold lists the packages apt will leave aloneLists the packages that are held back, so you can see why an upgrade skips them.24 Apr 2026
Storage3
- Tip
dpkg --verify openssh-serverdpkg --verify lists files of installed packages that changed on diskChecks installed package files against the md5sums dpkg stored at install time.3 Dec 2026 - Tip
apt list '~c'apt purge '~c' removes the config leftovers of packages you already removedCleans out packages that are gone but still left their configuration behind.30 Nov 2026 - Tip
dpkg -S /usr/bin/digdpkg -S finds the apt package that owns a file on diskTells you which installed package a given file belongs to.24 Nov 2026
Network3
- Tip
apt show nginxapt show tells you what a package is before you install itPrints a package's description, size, dependencies and source repository.30 Nov 2026 - Tip
apt-cache madison nginxapt-cache madison lists every version a repository offersLists all available versions of a package and the repository for each.24 Nov 2026 - Tip
apt policy nginxapt policy tells you which version you get and where it comes fromShows the installed version, the candidate version and which repository each comes from.17 Jun 2026
Nothing matches.