694208161b6fcc69b543568fc7f59e317c79afda
[myslice.git] / debian / deb-cheat-sheet
1 --- search package by name
2 apt-cache search emacs
3
4 --- install one package
5 apt-get install emacs23-nox
6
7 --- preparing upgrade (fetch and index latest versions of the repos)
8 apt-get update 
9 --- actually update one package
10 apt-get upgrade myslice
11
12 --- list packages
13 dpkg -l
14 dpkg -l '*foo*'
15
16 --- list (files for) one package 
17 dpkg -L myslice
18 dpkg-deb -c myslice_0.2.4.lxc.2013.11.26_amd64.deb
19 --- detailed info (e.g. to see complete version that is truncated in dpkg -l)
20 dpkg -s myslice
21 dpkg --info -c myslice_0.2.4.lxc.2013.11.26_amd64.deb
22
23 --- install from a local .deb 
24 dpkg -i foo.deb
25 - or, if this has deps that need to be pulled through apt-get:
26 gdebi foo.deb
27 (install with apt-get install -y gdebi-core)
28
29 --- find which package a file belongs to
30 apt-file search /path/to/file
31 (can be installed with : sudo apt-get install apt-file)
32
33 --- reinstall a package
34 apt-get purge openfire
35 apt-get install openfire