notes:apt-trick
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
notes:apt-trick [2014/10/02 17:45] – created admin | notes:apt-trick [2014/11/02 11:47] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | apt-get | + | ====== APT tricks for forgetful debian/ubuntu users ====== |
- | + | ||
- | You can run a simulation to see what would happen if you upgrade/install a package: | + | |
- | apt-get --dry-run install < | + | |
- | (or -s) | + | |
- | + | ||
- | + | ||
- | apt-get install --donwload-only < | + | |
- | (or -d) | + | |
+ | To update your package list | ||
apt-get update | apt-get update | ||
- | so your package list is up-to-date, | ||
- | | + | To simulate what would happen if you upgrade/ |
+ | | ||
- | apt-cache show postgresql | + | To download only a package |
- | the simplest way to see the description of a package: | + | apt-get install --download-only < |
+ | Re-install a package that is already installed and at the newest version | ||
+ | apt-get install --reinstall < | ||
- | | + | To upgrade a single package, and only if it is installed. |
- | Otherwise it prints out detailed information about the | + | |
- | | + | |
+ | To do keyword-based package searches | ||
+ | apt-cache search < | ||
+ | | ||
+ | To display the description, | ||
+ | apt-cache show < | ||
+ | To show the priority selection of the package (the installed and the repo versions) | ||
+ | apt-cache policy < | ||
- | The apt-cache command can do keyword-based package searches with apt-cache search keyword. It can also display | + | To show all the installed files of a package |
- | + | dpkg-query -L < | |
+ | or | ||
+ | dpkg --listfiles < |
notes/apt-trick.txt · Last modified: 2014/11/02 11:47 by admin