notes:apt-trick
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:apt-trick [2014/10/02 17:46] – 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 < | ||
- | apt-cache policy <package> | + | To upgrade a single |
- | Otherwise | + | apt-get install |
- | | + | |
- | + | ||
- | + | ||
- | + | ||
- | The apt-cache command can do keyword-based package searches with apt-cache search keyword. It can also display the headers of the package' | + | |
+ | 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 < | ||
- | How to upgrade | + | To show all the installed files of a package |
- | You just need to do apt-get install | + | dpkg-query -L < |
+ | or | ||
+ | dpkg --listfiles |
notes/apt-trick.1412271967.txt.gz · Last modified: 2014/10/02 17:46 by admin