This file is indexed.

/usr/share/doc/apt-dpkg-ref/apt-dpkg-ref.html is in apt-dpkg-ref 5.3.1+nmu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<HTML>
<HEAD>
<TITLE>APT and Dpkg Quick Reference Sheet</TITLE>
</HEAD>
<BODY><CENTER><H1>APT and Dpkg Quick Reference Sheet</H1>
<BR>
<B>Matthew Danish</B></CENTER>

<H3>Common APT usage</H3>
<B>apt-get install &lt;package&gt;</B>

Downloads &lt;package&gt; and all of its dependencies, and installs or upgrades them. This will also take a package off of <I>hold</I> if it was put on. See below for more info on <I>hold.</I><BR><BR>

<B>apt-get remove [--purge] &lt;package&gt;</B>

Removes &lt;package&gt; and any packages that depend on it.  --purge specifies that packages should be <I>purged</I>, see <FONT FACE="FIXED">dpkg -P</FONT> for more information.<BR><BR>

<B>apt-get update</B>

Updates packages listings from Debian mirrors, should be run at least once a day if you install anything that day, and every time after <FONT FACE="Helvetica">/etc/apt/sources.list</FONT> is changed.<BR><BR>

<B>apt-get upgrade [-u]</B>

Upgrades all packages installed to newest versions available. Will not install new or remove old packages. If a package changes dependencies and requires installation of a new package, it will not be upgraded, it will be put on <I>hold</I> instead. <FONT FACE="FIXED">apt-get upgrade</FONT> will not upgrade packages put on <I>hold</I> (that is the meaning of <I>hold</I>). See below for how to manually put packages on <I>hold</I>. I suggest the `-u' option as well, because then you can see what packages are going to be upgraded.<BR><BR>

<B>apt-get dist-upgrade [-u]</B>

Similar to <FONT FACE="FIXED">apt-get upgrade</FONT>, except that <I>dist-upgrade</I> will install or remove packages to satisfy dependencies.<BR><BR>

<B>apt-cache search &lt;pattern&gt;</B>

Searches packages and descriptions for &lt;pattern&gt;.<BR><BR>

<B>apt-cache show &lt;package&gt;</B>

Shows the full description of &lt;package&gt;.<BR><BR>

<B>apt-cache showpkg &lt;package&gt;</B>

Shows a lot more detail about &lt;package&gt;, and its relationships to other packages.<BR><BR>

<B>synaptic <BR> gdebi <BR> gdebi-kde <BR> dselect <BR> aptitude <BR> gnome-apt</B>

Graphical front ends to <I>APT</I> (some of these may be in their own package, that must be installed before use). While <FONT FACE="FIXED">dselect</FONT> is arguably the most powerful, it's also the oldest and hardest to use.<BR><BR>



<H3>Common Dpkg usage</H3>
<B>dpkg -i &lt;package.deb&gt;</B>

Installs a Debian package file; one that you downloaded manually, for example.<BR><BR>

<B>dpkg -c &lt;package.deb&gt;</B>

Lists the contents of &lt;package.deb&gt;, a .deb file.<BR><BR>

<B>dpkg -I &lt;package.deb&gt;</B>

Extracts package information from &lt;package.deb&gt;, a .deb file.<BR><BR>

<B>dpkg -r &lt;package&gt;</B>

Removes an installed package named &lt;package&gt;<BR><BR>

<B>dpkg -P &lt;package&gt;</B>

Purges an installed package named &lt;package&gt;.  The difference between <I>remove</I> and <I>purge</I> is that while <I>remove</I> only deletes data and executables, <I>purge</I> also deletes all configuration files in addition.<BR><BR>

<B>dpkg -L &lt;package&gt;</B>

Gives a listing of all the files installed by &lt;package&gt;.  See also <FONT FACE="FIXED">dpkg -c</FONT> for checking the contents of a .deb file.<BR><BR>

<B>dpkg -s &lt;package&gt;</B>

Shows information on the installed package &lt;package&gt;.  See also <FONT FACE="FIXED">apt-cache show</FONT> for viewing package information in the Debian archive and <FONT FACE="FIXED">dpkg -I</FONT> for viewing package information extracted from a .deb file.<BR><BR>

<B>dpkg-reconfigure &lt;package&gt;</B>

Reconfigures an installed package, if it uses <I>debconf</I> (<I>debconf</I> provides that consistent configuration interface for package installation).  You can reconfigure <I>debconf</I> itself if you want to change the front-end or priority of questions asked. For example, to reconfigure <I>debconf</I> with the dialog front-end, you simply run: 
<P><CENTER><CODE>dpkg-reconfigure --frontend=dialog debconf</CODE></CENTER></P>
<BR><BR>

<B>echo ``&lt;package&gt; hold'' | dpkg --set-selections</B>

Put &lt;package&gt; on <I>hold</I> (command line method)<BR><BR>

<B>dpkg --get-selections ``&lt;package&gt;''</B>

Get the current status of &lt;package&gt; (command line method)<BR><BR>

<B>dpkg -S &lt;file&gt;</B>

Searches for &lt;file&gt; in package database, telling you which installed packages have that file in them. To search for a file or list the contents of a package without installing it, you can use apt-file command line tool.<BR><BR>



<H3>Building Debian packages from Source</H3>
<B>apt-get source [-b] &lt;package&gt;</B>

Download the source Debian package for &lt;package&gt; and extract it. You must have deb-src lines in your <FONT FACE="Helvetica">/etc/apt/sources.list</FONT> for this to work. If you supply the `-b' option and you are currently root, then the package will be automatically built if possible.<BR><BR>

<B>apt-get build-dep &lt;package&gt;</B>

Download and install the packages necessary to build the source Debian package &lt;package&gt;.  This feature is only present in <FONT FACE="FIXED">apt</FONT> version 0.5 and up.  Currently this means that woody and above contain this functionality.  If you have an older version of <FONT FACE="FIXED">apt</FONT> then the easiest way to find out the build dependencies is to look in the <FONT FACE="Helvetica">debian/control</FONT> file in the source package directory.  A common usage of this command is in conjunction with <FONT FACE="FIXED">apt-get source -b</FONT>.  For example (as root): 
<P><CENTER><CODE>apt-get build-dep &lt;package&gt; <BR> apt-get source -b &lt;package&gt;</CODE></CENTER></P>
Will download the source package, all of its build dependencies, and attempt to compile the source package.<BR><BR>

<B>dpkg-source -x &lt;package.dsc&gt;</B>

If you have downloaded the source package for a program manually, which includes several files such as a .orig.tar.gz (or .tar.gz if it is Debian native), a .dsc, and a .diff.gz (if it is not Debian native), then you can unpack the source package using this command on the .dsc file.<BR><BR>

<B>dpkg-buildpackage</B>

Builds a Debian package from a Debian source tree.  You must be in the main directory of the source tree for this to work.  Sample usage: 
<P><CENTER><CODE>dpkg-buildpackage -rfakeroot -uc -b</CODE></CENTER></P>
Where `-rfakeroot' instructs it to use the <FONT FACE="FIXED">fakeroot</FONT> program to simulate root privileges (for ownership purposes), `-uc' stands for ``Don't cryptographically sign the changelog'', and `-b' stands for ``Build the binary package only''<BR><BR>

<B>debuild</B>

A handy wrapper script around <FONT FACE="FIXED">dpkg-buildpackage</FONT> that will automatically take care of using <FONT FACE="FIXED">fakeroot</FONT> or not, as well as running <FONT FACE="FIXED">lintian</FONT> and <FONT FACE="FIXED">gpg</FONT> for you. This script is provided by (:program ), so you need to install this package first.<BR><BR>



<H3>Fixing dependencies</H3>
<B>dpkg --configure --pending</B>

If dpkg quits with an error while <FONT FACE="FIXED">apt-get install, upgrade, or dist-upgrade</FONT>ing try running this to configure the packages that were already unpacked. Then try <FONT FACE="FIXED">apt-get install, upgrade, or dist-upgrade -f</FONT>, and then try <FONT FACE="FIXED">apt-get install, upgrade, or dist-upgrade</FONT> again. Repeat as needed. This usually resolves most dependency problems (also, if it mentions a specific package for some reason, you might want to try installing or removing that package)<BR><BR>

<B>apt-get install -f <BR> apt-get upgrade -f <BR> apt-get dist-upgrade -f</B>

Attempt to fix dependencies while doing one of the above. Note that <FONT FACE="FIXED">apt-get install -f</FONT> does not require a &lt;package&gt; argument.<BR><BR>



<H3>See Also</H3>
<B>man &lt;package&gt;</B>

To learn more about this commands you can always consult their man pages, e.g. man apt-get, man dpkg. You can also find information about this and more tools, HOWTOs, manuals, etc at http://www.debian.org/doc/.<BR><BR>



</BODY>
</HTML>