brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: apt download fetches a .deb without installing it

Apt
~/tips/tip-apt-download-deb-no-install

apt download htop

Saves a package as a .deb file in the current directory without installing it.

Sometimes I want the package file itself, to inspect it or to carry it to a machine without internet.

apt download htop
dpkg-deb -c htop_*.deb | head

apt download saves the .deb of the current candidate version in the working directory. It needs no root, because it does not touch the package database. dpkg-deb -c lists the files inside the archive and dpkg-deb -I shows the control data. The command downloads only that package, not its dependencies, so an offline install may still need more files. Files land in the current directory, so change to a scratch folder first.

Further reading: apt-get manual page

More Apt tips sudo apt-mark minimize-manual apt list '~c' grep -E ' (install|upgrade|remove) ' /var/log/dpkg.log | tail -o Dpkg::Options::="–force-confold" upgrade sudo apt-get -d -y full-upgrade All Apt tips (42) All topics

Link