notes:apt-trick
APT tricks for forgetful debian/ubuntu users
To update your package list
apt-get update
To simulate what would happen if you upgrade/install a package with –dry-run or -s
apt-get install --dry-run <pkgname>
To download only a package without installing it with –download-only or -d
apt-get install --download-only <pkgname>
Re-install a package that is already installed and at the newest version
apt-get install --reinstall <pkgname>
To upgrade a single package, and only if it is installed.
apt-get install --only-upgrade <pkgname>
To do keyword-based package searches
apt-cache search <keyword>
To display the description, the headers, the dependencies of a package:
apt-cache show <pkgname>
To show the priority selection of the package (the installed and the repo versions)
apt-cache policy <pkgname>
To show all the installed files of a package use
dpkg-query -L <pkgname>
or
dpkg --listfiles <pkgname>
notes/apt-trick.txt · Last modified: 2014/11/02 11:47 by admin