1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
7
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
9
<title>The Debian GNU/Linux FAQ - Basics of the Debian package management system</title>
11
<link href="index.en.html" rel="start">
12
<link href="ch-ftparchives.en.html" rel="prev">
13
<link href="ch-pkgtools.en.html" rel="next">
14
<link href="index.en.html#contents" rel="contents">
15
<link href="index.en.html#copyright" rel="copyright">
16
<link href="ch-basic_defs.en.html" rel="chapter" title="1 Definitions and overview">
17
<link href="ch-getting.en.html" rel="chapter" title="2 Getting and installing Debian GNU/Linux">
18
<link href="ch-choosing.en.html" rel="chapter" title="3 Choosing a Debian distribution">
19
<link href="ch-compat.en.html" rel="chapter" title="4 Compatibility issues">
20
<link href="ch-software.en.html" rel="chapter" title="5 Software available in the Debian system">
21
<link href="ch-ftparchives.en.html" rel="chapter" title="6 The Debian FTP archives">
22
<link href="ch-pkg_basics.en.html" rel="chapter" title="7 Basics of the Debian package management system">
23
<link href="ch-pkgtools.en.html" rel="chapter" title="8 The Debian package management tools">
24
<link href="ch-uptodate.en.html" rel="chapter" title="9 Keeping your Debian system up-to-date">
25
<link href="ch-kernel.en.html" rel="chapter" title="10 Debian and the kernel">
26
<link href="ch-customizing.en.html" rel="chapter" title="11 Customizing your installation of Debian GNU/Linux">
27
<link href="ch-support.en.html" rel="chapter" title="12 Getting support for Debian GNU/Linux">
28
<link href="ch-contributing.en.html" rel="chapter" title="13 Contributing to the Debian Project">
29
<link href="ch-redistrib.en.html" rel="chapter" title="14 Redistributing Debian GNU/Linux in a commercial product">
30
<link href="ch-nexttime.en.html" rel="chapter" title="15 Changes expected in the next major release of Debian">
31
<link href="ch-faqinfo.en.html" rel="chapter" title="16 General information about the FAQ">
32
<link href="ch-basic_defs.en.html#s-whatisfaq" rel="section" title="1.1 What is this FAQ?">
33
<link href="ch-basic_defs.en.html#s-whatisdebian" rel="section" title="1.2 What is Debian GNU/Linux?">
34
<link href="ch-basic_defs.en.html#s-linux" rel="section" title="1.3 OK, now I know what Debian is... what is Linux?!">
35
<link href="ch-basic_defs.en.html#s-non-linux" rel="section" title="1.4 Does Debian just do GNU/Linux?">
36
<link href="ch-basic_defs.en.html#s-difference" rel="section" title="1.5 What is the difference between Debian GNU/Linux and other Linux distributions? Why should I choose Debian over some other distribution?">
37
<link href="ch-basic_defs.en.html#s-gnu" rel="section" title="1.6 How does the Debian project fit in or compare with the Free Software Foundation's GNU project?">
38
<link href="ch-basic_defs.en.html#s-pronunciation" rel="section" title="1.7 How does one pronounce Debian and what does this word mean?">
39
<link href="ch-getting.en.html#s-version" rel="section" title="2.1 What is the latest version of Debian?">
40
<link href="ch-getting.en.html#s-updatestable" rel="section" title="2.2 Are there package upgrades in `stable'?">
41
<link href="ch-getting.en.html#s-boot-floppies" rel="section" title="2.3 Where/how can I get the Debian installation disks?">
42
<link href="ch-getting.en.html#s-cdrom" rel="section" title="2.4 How do I install the Debian from CD-ROMs?">
43
<link href="ch-getting.en.html#s-cdimage-symlinks" rel="section" title="2.5 Why does the official stable released CD-ROM contain symlinks for `frozen' and `unstable'? I thought this CD contains just `stable'!">
44
<link href="ch-getting.en.html#s-remoteinstall" rel="section" title="2.6 Can I get and install Debian directly from a remote Internet site?">
45
<link href="ch-getting.en.html#s-alternativebootinstaller" rel="section" title="2.7 Are there any alternative strategies for booting the system installer?">
46
<link href="ch-choosing.en.html#s3.1" rel="section" title="3.1 Which Debian distribution (stable/testing/unstable) is better for me?">
47
<link href="ch-choosing.en.html#s3.2" rel="section" title="3.2 But what about Knoppix, Linex, Ubuntu, and others?">
48
<link href="ch-compat.en.html#s-arches" rel="section" title="4.1 On what hardware architectures/systems does Debian GNU/Linux run?">
49
<link href="ch-compat.en.html#s-otherdistribs" rel="section" title="4.2 How compatible is Debian with other distributions of Linux?">
50
<link href="ch-compat.en.html#s-otherunices" rel="section" title="4.3 How source code compatible is Debian with other Unix systems?">
51
<link href="ch-compat.en.html#s-otherpackages" rel="section" title="4.4 Can I use Debian packages (".deb" files) on my Red Hat/Slackware/... Linux system? Can I use Red Hat packages (".rpm" files) on my Debian GNU/Linux system?">
52
<link href="ch-compat.en.html#s-non-debian-programs" rel="section" title="4.5 How should I install a non-Debian program?">
53
<link href="ch-compat.en.html#s-termcap" rel="section" title="4.6 Why can't I compile programs that require libtermcap?">
54
<link href="ch-compat.en.html#s-accelx" rel="section" title="4.7 Why can't I install AccelX?">
55
<link href="ch-compat.en.html#s-motifnls" rel="section" title="4.8 Why do my old XFree 2.1 Motif applications crash?">
56
<link href="ch-software.en.html#s-apps" rel="section" title="5.1 What types of applications and development software are available for Debian GNU/Linux?">
57
<link href="ch-software.en.html#s-softwareauthors" rel="section" title="5.2 Who wrote all that software?">
58
<link href="ch-software.en.html#s-pkglist" rel="section" title="5.3 How can I get a current list of programs that have been packaged for Debian?">
59
<link href="ch-software.en.html#s-buildenv" rel="section" title="5.4 How can I install a developer's environment to build packages?">
60
<link href="ch-software.en.html#s-missing" rel="section" title="5.5 What is missing from Debian GNU/Linux?">
61
<link href="ch-software.en.html#s-no-devs" rel="section" title="5.6 Why do I get "ld: cannot find -lfoo" messages when compiling programs? Why aren't there any libfoo.so files in Debian library packages?">
62
<link href="ch-software.en.html#s-java" rel="section" title="5.7 (How) Does Debian support Java?">
63
<link href="ch-software.en.html#s-isitdebian" rel="section" title="5.8 How can I check that I am using a Debian system, and what version is it?">
64
<link href="ch-software.en.html#s-nonenglish" rel="section" title="5.9 How does Debian support non-English languages?">
65
<link href="ch-software.en.html#s-pine" rel="section" title="5.10 Where is pine?">
66
<link href="ch-software.en.html#s-qmail" rel="section" title="5.11 Where is qmail/ezmlm/djbdns?">
67
<link href="ch-software.en.html#s-flash" rel="section" title="5.12 Where is a player for Flash (SWF)?">
68
<link href="ch-software.en.html#s-googleearth" rel="section" title="5.13 Where is Google Earth?">
69
<link href="ch-software.en.html#s-voip" rel="section" title="5.14 Where is VoIP software?">
70
<link href="ch-software.en.html#s-nonfreewireless" rel="section" title="5.15 I have a wireless network card which doesn't work with Linux. What should I do?">
71
<link href="ch-ftparchives.en.html#s-dists" rel="section" title="6.1 How many Debian distributions are there?">
72
<link href="ch-ftparchives.en.html#s-codenames" rel="section" title="6.2 What are all those names like etch, lenny, etc.?">
73
<link href="ch-ftparchives.en.html#s-sid" rel="section" title="6.3 What about "sid"?">
74
<link href="ch-ftparchives.en.html#s-stable" rel="section" title="6.4 What does the stable directory contain?">
75
<link href="ch-ftparchives.en.html#s-testing" rel="section" title="6.5 What does the testing distribution contain?">
76
<link href="ch-ftparchives.en.html#s-unstable" rel="section" title="6.6 What does the unstable distribution contain?">
77
<link href="ch-ftparchives.en.html#s-dirtree" rel="section" title="6.7 What are all those directories at the Debian FTP archives?">
78
<link href="ch-ftparchives.en.html#s-archsections" rel="section" title="6.8 What are all those directories inside <samp>dists/stable/main</samp>?">
79
<link href="ch-ftparchives.en.html#s-source" rel="section" title="6.9 Where is the source code?">
80
<link href="ch-ftparchives.en.html#s-pools" rel="section" title="6.10 What's in the <samp>pool</samp> directory?">
81
<link href="ch-ftparchives.en.html#s-incoming" rel="section" title="6.11 What is "incoming"?">
82
<link href="ch-ftparchives.en.html#s-ownrepository" rel="section" title="6.12 How do I set up my own apt-able repository?">
83
<link href="ch-pkg_basics.en.html#s-package" rel="section" title="7.1 What is a Debian package?">
84
<link href="ch-pkg_basics.en.html#s-deb-format" rel="section" title="7.2 What is the format of a Debian binary package?">
85
<link href="ch-pkg_basics.en.html#s-pkgname" rel="section" title="7.3 Why are Debian package file names so long?">
86
<link href="ch-pkg_basics.en.html#s-controlfile" rel="section" title="7.4 What is a Debian control file?">
87
<link href="ch-pkg_basics.en.html#s-conffile" rel="section" title="7.5 What is a Debian conffile?">
88
<link href="ch-pkg_basics.en.html#s-maintscripts" rel="section" title="7.6 What is a Debian preinst, postinst, prerm, and postrm script?">
89
<link href="ch-pkg_basics.en.html#s-priority" rel="section" title="7.7 What is an <em>Essential</em>, <em>Required</em>, <em>Important</em>, <em>Standard</em>, <em>Optional</em>, or <em>Extra</em> package?">
90
<link href="ch-pkg_basics.en.html#s-virtual" rel="section" title="7.8 What is a Virtual Package?">
91
<link href="ch-pkg_basics.en.html#s-depends" rel="section" title="7.9 What is meant by saying that a package <em>Depends</em>, <em>Recommends</em>, <em>Suggests</em>, <em>Conflicts</em>, <em>Replaces</em> or <em>Provides</em> another package?">
92
<link href="ch-pkg_basics.en.html#s-pre-depends" rel="section" title="7.10 What is meant by Pre-Depends?">
93
<link href="ch-pkg_basics.en.html#s-pkgstatus" rel="section" title="7.11 What is meant by <em>unknown</em>, <em>install</em>, <em>remove</em>, <em>purge</em> and <em>hold</em> in the package status?">
94
<link href="ch-pkg_basics.en.html#s-puttingonhold" rel="section" title="7.12 How do I put a package on hold?">
95
<link href="ch-pkg_basics.en.html#s-sourcepkgs" rel="section" title="7.13 How do I install a source package?">
96
<link href="ch-pkg_basics.en.html#s-sourcebuild" rel="section" title="7.14 How do I build binary packages from a source package?">
97
<link href="ch-pkg_basics.en.html#s-creatingdebs" rel="section" title="7.15 How do I create Debian packages myself?">
98
<link href="ch-pkgtools.en.html#s-pkgprogs" rel="section" title="8.1 What programs does Debian provide for managing its packages?">
99
<link href="ch-pkgtools.en.html#s-updaterunning" rel="section" title="8.2 Debian claims to be able to update a running program; how is this accomplished?">
100
<link href="ch-pkgtools.en.html#s-whatpackages" rel="section" title="8.3 How can I tell what packages are already installed on a Debian system?">
101
<link href="ch-pkgtools.en.html#s-listfiles" rel="section" title="8.4 How to display the files of a package installed?">
102
<link href="ch-pkgtools.en.html#s-filesearch" rel="section" title="8.5 How can I find out what package produced a particular file?">
103
<link href="ch-pkgtools.en.html#s-datapackages" rel="section" title="8.6 Why doesn't get `foo-data' removed when I uninstall `foo'? How do I make sure old unused library-packages get purged?">
104
<link href="ch-uptodate.en.html#s-howtocurrent" rel="section" title="9.1 How can I keep my Debian system current?">
105
<link href="ch-uptodate.en.html#s-upgradesingle" rel="section" title="9.2 Must I go into single user mode in order to upgrade a package?">
106
<link href="ch-uptodate.en.html#s-savedebs" rel="section" title="9.3 Do I have to keep all those .deb archive files on my disk?">
107
<link href="ch-uptodate.en.html#s-keepingalog" rel="section" title="9.4 How can I keep a log of the packages I added to the system? I'd like to know when which package upgrades and removals have occured!">
108
<link href="ch-uptodate.en.html#s-autoupdate" rel="section" title="9.5 Can I automatically update the system?">
109
<link href="ch-uptodate.en.html#s-aptproxy" rel="section" title="9.6 I have several machines how can I download the updates only one time?">
110
<link href="ch-kernel.en.html#s-non-debian-kernel" rel="section" title="10.1 Can I install and compile a kernel without some Debian-specific tweaking?">
111
<link href="ch-kernel.en.html#s-customkernel" rel="section" title="10.2 What tools does Debian provide to build custom kernels?">
112
<link href="ch-kernel.en.html#s-custombootdisk" rel="section" title="10.3 How can I make a custom boot floppy?">
113
<link href="ch-kernel.en.html#s-modules" rel="section" title="10.4 What special provisions does Debian provide to deal with modules?">
114
<link href="ch-kernel.en.html#s-removeoldkernel" rel="section" title="10.5 Can I safely de-install an old kernel package, and if so, how?">
115
<link href="ch-customizing.en.html#s-papersize" rel="section" title="11.1 How can I ensure that all programs use the same paper size?">
116
<link href="ch-customizing.en.html#s-hardwareaccess" rel="section" title="11.2 How can I provide access to hardware peripherals, without compromising security?">
117
<link href="ch-customizing.en.html#s-consolefont" rel="section" title="11.3 How do I load a console font on startup the Debian way?">
118
<link href="ch-customizing.en.html#s-appdefaults" rel="section" title="11.4 How can I configure an X11 program's application defaults?">
119
<link href="ch-customizing.en.html#s-booting" rel="section" title="11.5 Every distribution seems to have a different boot-up method. Tell me about Debian's.">
120
<link href="ch-customizing.en.html#s-custombootscripts" rel="section" title="11.6 It looks as if Debian does not use <samp>rc.local</samp> to customize the boot process; what facilities are provided?">
121
<link href="ch-customizing.en.html#s-interconffiles" rel="section" title="11.7 How does the package management system deal with packages that contain configuration files for other packages?">
122
<link href="ch-customizing.en.html#s-divert" rel="section" title="11.8 How do I override a file installed by a package, so that a different version can be used instead?">
123
<link href="ch-customizing.en.html#s-localpackages" rel="section" title="11.9 How can I have my locally-built package included in the list of available packages that the package management system knows about?">
124
<link href="ch-customizing.en.html#s-diverse" rel="section" title="11.10 Some users like mawk, others like gawk; some like vim, others like elvis; some like trn, others like tin; how does Debian support diversity?">
125
<link href="ch-support.en.html#s-debiandocs" rel="section" title="12.1 What other documentation exists on and for a Debian system?">
126
<link href="ch-support.en.html#s-onlineresources" rel="section" title="12.2 Are there any on-line resources for discussing Debian?">
127
<link href="ch-support.en.html#s-searchtools" rel="section" title="12.3 Is there a quick way to search for information on Debian GNU/Linux?">
128
<link href="ch-support.en.html#s-buglogs" rel="section" title="12.4 Are there logs of known bugs?">
129
<link href="ch-support.en.html#s-bugreport" rel="section" title="12.5 How do I report a bug in Debian?">
130
<link href="ch-contributing.en.html#s-contrib" rel="section" title="13.1 How can I become a Debian software developer?">
131
<link href="ch-contributing.en.html#s-contribresources" rel="section" title="13.2 How can I contribute resources to the Debian project?">
132
<link href="ch-contributing.en.html#s-supportingorganizations" rel="section" title="13.3 How can I contribute financially to the Debian project?">
133
<link href="ch-redistrib.en.html#s-sellcds" rel="section" title="14.1 Can I make and sell Debian CDs?">
134
<link href="ch-redistrib.en.html#s-packagednonfree" rel="section" title="14.2 Can Debian be packaged with non-free software?">
135
<link href="ch-redistrib.en.html#s-childistro" rel="section" title="14.3 I am making a special Linux distribution for a "vertical market". Can I use Debian GNU/Linux for the guts of a Linux system and add my own applications on top of it?">
136
<link href="ch-redistrib.en.html#s-commercialdebs" rel="section" title="14.4 Can I put my commercial program in a Debian "package" so that it installs effortlessly on any Debian system?">
137
<link href="ch-nexttime.en.html#s-i18n" rel="section" title="15.1 Extended support for non-English users">
138
<link href="ch-nexttime.en.html#s-dependencybasedboot" rel="section" title="15.2 Faster booting: Dependency based boot sequence">
139
<link href="ch-nexttime.en.html#s-di" rel="section" title="15.3 Improvements in the Debian Installer">
140
<link href="ch-nexttime.en.html#s-morearches" rel="section" title="15.4 More architectures">
141
<link href="ch-nexttime.en.html#s-morekernels" rel="section" title="15.5 More kernels">
142
<link href="ch-faqinfo.en.html#s-authors" rel="section" title="16.1 Authors">
143
<link href="ch-faqinfo.en.html#s-feedback" rel="section" title="16.2 Feedback">
144
<link href="ch-faqinfo.en.html#s-latest" rel="section" title="16.3 Availability">
145
<link href="ch-faqinfo.en.html#s-docformat" rel="section" title="16.4 Document format">
146
<link href="ch-choosing.en.html#s3.1.1" rel="subsection" title="3.1.1 You asked me to install stable, but in stable so and so hardware is not detected/working. What should I do?">
147
<link href="ch-choosing.en.html#s3.1.2" rel="subsection" title="3.1.2 Will there be different different versions of packages in different distributions?">
148
<link href="ch-choosing.en.html#s3.1.3" rel="subsection" title="3.1.3 The stable distributions really contains outdated packages. Just look at Kde, Gnome, Xorg or even the kernel. They are very old. Why is it so?">
149
<link href="ch-choosing.en.html#s3.1.4" rel="subsection" title="3.1.4 If I were to decide to change to another distribution, Can I do that?">
150
<link href="ch-choosing.en.html#s3.1.5" rel="subsection" title="3.1.5 Could you tell me whether to install testing or unstable?">
151
<link href="ch-choosing.en.html#s3.1.6" rel="subsection" title="3.1.6 You are talking about testing being broken. What do you mean by that?">
152
<link href="ch-choosing.en.html#s3.1.7" rel="subsection" title="3.1.7 Why is it that testing could be broken for months? Wont the fixes introduced in unstable flow directly down into testing?">
153
<link href="ch-choosing.en.html#s3.1.8" rel="subsection" title="3.1.8 From an administrator's point of view, Which distribution requires more attention?">
154
<link href="ch-choosing.en.html#s3.1.9" rel="subsection" title="3.1.9 What happens when a new release is made?">
155
<link href="ch-choosing.en.html#s3.1.10" rel="subsection" title="3.1.10 I have a working Desktop/cluster with Debian installed. How do I know which distribution I am running?">
156
<link href="ch-choosing.en.html#s3.1.11" rel="subsection" title="3.1.11 I am currently tracking stable. Can I change to testing or unstable? If so, How?">
157
<link href="ch-choosing.en.html#s3.1.12" rel="subsection" title="3.1.12 I am currently tracking testing (lenny). What will happen when a release is made? Will I still be tracking testing or will my machine be running the new stable distribution?">
158
<link href="ch-choosing.en.html#s3.1.13" rel="subsection" title="3.1.13 I am still confused. What did you say I should install?">
159
<link href="ch-choosing.en.html#s3.2.1" rel="subsection" title="3.2.1 I know that Knoppix/Linex/Ubuntu/... is Debian-based. So after installing it on the hard disk, can I use 'apt' package tools on it?">
160
<link href="ch-choosing.en.html#s3.2.2" rel="subsection" title="3.2.2 I installed Knoppix/Linex/Ubuntu/... on my hard disk. Now I have a problem. What should I do?">
161
<link href="ch-choosing.en.html#s3.2.3" rel="subsection" title="3.2.3 I'm using Knoppix/Linex/Ubuntu/... and now I want to use Debian. How do I migrate?">
162
<link href="ch-ftparchives.en.html#s-oldcodenames" rel="subsection" title="6.2.1 Which other codenames have been used in the past?">
163
<link href="ch-ftparchives.en.html#s-sourceforcodenames" rel="subsection" title="6.2.2 Where do these codenames come from?">
164
<link href="ch-ftparchives.en.html#s-frozen" rel="subsection" title="6.5.1 What about "testing"? How is it `frozen'?">
165
<link href="ch-pkgtools.en.html#s-dpkg" rel="subsection" title="8.1.1 dpkg">
166
<link href="ch-pkgtools.en.html#s-apt-get" rel="subsection" title="8.1.2 APT">
167
<link href="ch-pkgtools.en.html#s-aptitude" rel="subsection" title="8.1.3 aptitude">
168
<link href="ch-pkgtools.en.html#s-synaptic" rel="subsection" title="8.1.4 synaptic">
169
<link href="ch-pkgtools.en.html#s-tasksel" rel="subsection" title="8.1.5 tasksel">
170
<link href="ch-pkgtools.en.html#s-dpkg-extra" rel="subsection" title="8.1.6 Other package management tools">
171
<link href="ch-pkgtools.en.html#s-dselect" rel="subsection" title="8.1.6.1 dselect">
172
<link href="ch-pkgtools.en.html#s-dpkg-deb" rel="subsection" title="8.1.6.2 dpkg-deb">
173
<link href="ch-pkgtools.en.html#s-dpkg-split" rel="subsection" title="8.1.6.3 dpkg-split">
174
<link href="ch-uptodate.en.html#s-aptitude-upgrade" rel="subsection" title="9.1.1 aptitude">
175
<link href="ch-uptodate.en.html#s-apt" rel="subsection" title="9.1.2 apt-get, dselect and apt-cdrom">
176
<link href="ch-uptodate.en.html#s-update_aptitude" rel="subsection" title="9.1.3 aptitude">
177
<link href="ch-uptodate.en.html#s-mirror" rel="subsection" title="9.1.4 mirror">
178
<link href="ch-uptodate.en.html#s-dpkg-mountable" rel="subsection" title="9.1.5 dpkg-mountable">
179
<link href="ch-support.en.html#s12.2.1" rel="subsection" title="12.2.1 Mailing lists">
180
<link href="ch-support.en.html#s-mailinglistconduct" rel="subsection" title="12.2.1.1 What is the code of conduct for the mailing lists?">
181
<link href="ch-support.en.html#s12.2.2" rel="subsection" title="12.2.2 Web forums">
182
<link href="ch-support.en.html#s12.2.3" rel="subsection" title="12.2.3 Wiki">
183
<link href="ch-support.en.html#s12.2.4" rel="subsection" title="12.2.4 Maintainers">
184
<link href="ch-support.en.html#s12.2.5" rel="subsection" title="12.2.5 Usenet newsgroups">
185
<link href="ch-contributing.en.html#s-SPI" rel="subsection" title="13.3.1 Software in the Public Interest">
186
<link href="ch-contributing.en.html#s-FSF" rel="subsection" title="13.3.2 Free Software Foundation">
192
<p><a name="ch-pkg_basics"></a></p>
196
[ <a href="ch-ftparchives.en.html">previous</a> ]
197
[ <a href="index.en.html#contents">Contents</a> ]
198
[ <a href="ch-basic_defs.en.html">1</a> ]
199
[ <a href="ch-getting.en.html">2</a> ]
200
[ <a href="ch-choosing.en.html">3</a> ]
201
[ <a href="ch-compat.en.html">4</a> ]
202
[ <a href="ch-software.en.html">5</a> ]
203
[ <a href="ch-ftparchives.en.html">6</a> ]
205
[ <a href="ch-pkgtools.en.html">8</a> ]
206
[ <a href="ch-uptodate.en.html">9</a> ]
207
[ <a href="ch-kernel.en.html">10</a> ]
208
[ <a href="ch-customizing.en.html">11</a> ]
209
[ <a href="ch-support.en.html">12</a> ]
210
[ <a href="ch-contributing.en.html">13</a> ]
211
[ <a href="ch-redistrib.en.html">14</a> ]
212
[ <a href="ch-nexttime.en.html">15</a> ]
213
[ <a href="ch-faqinfo.en.html">16</a> ]
214
[ <a href="ch-pkgtools.en.html">next</a> ]
220
The Debian GNU/Linux FAQ
221
<br>Chapter 7 - Basics of the Debian package management system
227
This chapter touches on some lower level internals of Debian package
228
management. If you're interested mainly in <em>usage</em> of the relevant
229
tools, skip to chapters <a href="ch-pkgtools.en.html">The Debian package
230
management tools, Chapter 8</a> and/or <a href="ch-uptodate.en.html">Keeping
231
your Debian system up-to-date, Chapter 9</a>.
236
<h2><a name="s-package"></a>7.1 What is a Debian package?</h2>
239
Packages generally contain all of the files necessary to implement a set of
240
related commands or features. There are two types of Debian packages:
245
<em>Binary packages</em>, which contain executables, configuration files,
246
man/info pages, copyright information, and other documentation. These packages
247
are distributed in a Debian-specific archive format (see <a
248
href="#s-deb-format">What is the format of a Debian binary package?, Section
249
7.2</a>); they are usually distinguished by having a '.deb' file extension.
250
Binary packages can be unpacked using the Debian utility <samp>dpkg</samp>
251
(possibly via a frontend like <code>aptitude</code>); details are given in its
259
<em>Source packages</em>, which consist of a <samp>.dsc</samp> file describing
260
the source package (including the names of the following files), a
261
<samp>.orig.tar.gz</samp> file that contains the original unmodified source in
262
gzip-compressed tar format and usually a <samp>.diff.gz</samp> file that
263
contains the Debian-specific changes to the original source. The utility
264
<samp>dpkg-source</samp> packs and unpacks Debian source archives; details are
265
provided in its manual page. (The program <code>apt-get</code> can get used a
266
frontend for <samp>dpkg-source</samp>.)
272
Installation of software by the package system uses "dependencies"
273
which are carefully designed by the package maintainers. These dependencies
274
are documented in the <samp>control</samp> file associated with each package.
275
For example, the package containing the GNU C compiler (<code>gcc</code>)
276
"depends" on the package <code>binutils</code> which includes the
277
linker and assembler. If a user attempts to install <code>gcc</code> without
278
having first installed <code>binutils</code>, the package management system
279
(dpkg) will send an error message that it also needs <code>binutils</code>, and
280
stop installing <code>gcc</code>. (However, this facility can be overridden by
281
the insistent user, see <code>dpkg(8)</code>.) See more in <a
282
href="#s-depends">What is meant by saying that a package <em>Depends</em>,
283
<em>Recommends</em>, <em>Suggests</em>, <em>Conflicts</em>, <em>Replaces</em>
284
or <em>Provides</em> another package?, Section 7.9</a> below.
288
Debian's packaging tools can be used to:
293
manipulate and manage packages or parts of packages,
300
administer local overrides of files in a package,
307
aid developers in the construction of package archives, and
314
aid users in the installation of packages which reside on a remote FTP site.
321
<h2><a name="s-deb-format"></a>7.2 What is the format of a Debian binary package?</h2>
324
A Debian "package", or a Debian archive file, contains the executable
325
files, libraries, and documentation associated with a particular suite of
326
program or set of related programs. Normally, a Debian archive file has a
327
filename that ends in <samp>.deb</samp>.
331
The internals of this Debian binary packages format are described in the
332
<code>deb(5)</code> manual page. This internal format is subject to change
333
(between major releases of Debian GNU/Linux), therefore please always use
334
<code>dpkg-deb(1)</code> if you need to do lowlevel manipulations on
335
<samp>.deb</samp> files.
340
<h2><a name="s-pkgname"></a>7.3 Why are Debian package file names so long?</h2>
343
The Debian binary package file names conform to the following convention:
344
<foo>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
348
Note that <samp>foo</samp> is supposed to be the package name. As a check, one
349
can learn the package name associated with a particular Debian archive file
350
(.deb file) in one of these ways:
355
inspect the "Packages" file in the directory where it was stored at a
356
Debian FTP archive site. This file contains a stanza describing each package;
357
the first field in each stanza is the formal package name.
364
use the command <samp>dpkg --info foo_VVV-RRR_AAA.deb</samp> (where VVV, RRR
365
and AAA are the version, revision and architecture of the package in question,
366
respectively). This displays, among other things, the package name
367
corresponding to the archive file being unpacked.
373
The <samp>VVV</samp> component is the version number specified by the upstream
374
developer. There are no standards in place here, so the version number may
375
have formats as different as "19990513" and "1.3.8pre1".
379
The <samp>RRR</samp> component is the Debian revision number, and is specified
380
by the Debian developer (or an individual user if he chooses to build the
381
package himself). This number corresponds to the revision level of the Debian
382
package, thus, a new revision level usually signifies changes in the Debian
383
Makefile (<samp>debian/rules</samp>), the Debian control file
384
(<samp>debian/control</samp>), the installation or removal scripts
385
(<samp>debian/p*</samp>), or in the configuration files used with the package.
389
The <samp>AAA</samp> component identifies the processor for which the package
390
was built. This is commonly <samp>i386</samp>, which refers to chips
391
compatible to Intel's 386 or later versions. For other possibilities review
392
Debian's FTP directory structure at <a
393
href="ch-ftparchives.en.html#s-dirtree">What are all those directories at the
394
Debian FTP archives?, Section 6.7</a>. For details, see the description of
395
"Debian architecture" in the manual page
396
<code>dpkg-architecture(1)</code>.
401
<h2><a name="s-controlfile"></a>7.4 What is a Debian control file?</h2>
404
Specifics regarding the contents of a Debian control file are provided in the
405
Debian Policy Manual, section 5, see <a
406
href="ch-support.en.html#s-debiandocs">What other documentation exists on and
407
for a Debian system?, Section 12.1</a>.
411
Briefly, a sample control file is shown below for the Debian package hello:
419
Maintainer: Adam Heath <doogie@debian.org>
422
Depends: libc6 (>= 2.1)
423
Description: The classic greeting, and a good example
424
The GNU hello program produces a familiar, friendly greeting. It
425
allows nonprogrammers to use a classic computer science tool which
426
would otherwise be unavailable to them.
428
Seriously, though: this is an example of how to do a Debian package.
429
It is the Debian version of the GNU Project's `hello world' program
430
(which is itself an example for the GNU Project).
434
The Package field gives the package name. This is the name by which the
435
package can be manipulated by the package tools, and usually similar to but not
436
necessarily the same as the first component string in the Debian archive file
441
The Version field gives both the upstream developer's version number and (in
442
the last component) the revision level of the Debian package of this program as
443
explained in <a href="#s-pkgname">Why are Debian package file names so long?,
448
The Architecture field specifies the chip for which this particular binary was
453
The Depends field gives a list of packages that have to be installed in order
454
to install this package successfully.
458
The Installed-Size indicates how much disk space the installed package will
459
consume. This is intended to be used by installation front-ends in order to
460
show whether there is enough disk space available to install the program.
464
The Section line gives the "section" where this Debian package is
465
stored at the Debian FTP sites.
469
The Priority indicates how important is this package for installation, so that
470
semi-intelligent software like dselect or aptitude can sort the package into a
471
category of e.g. packages optionally installed. See <a
472
href="#s-priority">What is an <em>Essential</em>, <em>Required</em>,
473
<em>Important</em>, <em>Standard</em>, <em>Optional</em>, or <em>Extra</em>
474
package?, Section 7.7</a>.
478
The Maintainer field gives the e-mail address of the person who is currently
479
responsible for maintaining this package.
483
The Description field gives a brief summary of the package's features.
487
For more information about all possible fields a package can have, please see
488
the Debian Policy Manual, section 5., "Control files and their
494
<h2><a name="s-conffile"></a>7.5 What is a Debian conffile?</h2>
497
Conffiles is a list of configuration files (usually placed in
498
<samp>/etc</samp>) that the package management system will not overwrite when
499
the package is upgraded. This ensures that local values for the contents of
500
these files will be preserved, and is a critical feature enabling the in-place
501
upgrade of packages on a running system.
505
To determine exactly which files are preserved during an upgrade, run:
509
dpkg --status package
513
And look under "Conffiles:".
518
<h2><a name="s-maintscripts"></a>7.6 What is a Debian preinst, postinst, prerm, and postrm script?</h2>
521
These files are executable scripts which are automatically run before or after
522
a package is installed. Along with a file named <samp>control</samp>, all of
523
these files are part of the "control" section of a Debian archive
528
The individual files are:
534
This script executes before that package will be unpacked from its Debian
535
archive (".deb") file. Many 'preinst' scripts stop services for
536
packages which are being upgraded until their installation or upgrade is
537
completed (following the successful execution of the 'postinst' script).
545
This script typically completes any required configuration of the package
546
<samp>foo</samp> once <samp>foo</samp> has been unpacked from its Debian
547
archive (".deb") file. Often, 'postinst' scripts ask the user for
548
input, and/or warn the user that if he accepts default values, he should
549
remember to go back and re-configure that package as the situation warrants.
550
Many 'postinst' scripts then execute any commands necessary to start or restart
551
a service once a new package has been installed or upgraded.
559
This script typically stops any daemons which are associated with a package.
560
It is executed before the removal of files associated with the package.
568
This script typically modifies links or other files associated with
569
<samp>foo</samp>, and/or removes files created by the package. (Also see <a
570
href="#s-virtual">What is a Virtual Package?, Section 7.8</a>.)
576
Currently all of the control files can be found in directory
577
<samp>/var/lib/dpkg/info</samp>. The files relevant to package
578
<samp>foo</samp> begin with the name "foo" and have file extensions
579
of "preinst", "postinst", etc., as appropriate. The file
580
<samp>foo.list</samp> in that directory lists all of the files that were
581
installed with the package <samp>foo</samp>. (Note that the location of these
582
files is a dpkg internal; you should not rely on it.)
587
<h2><a name="s-priority"></a>7.7 What is an <em>Essential</em>, <em>Required</em>, <em>Important</em>, <em>Standard</em>, <em>Optional</em>, or <em>Extra</em> package?</h2>
590
Each Debian package is assigned a <em>priority</em> by the distribution
591
maintainers, as an aid to the package management system. The priorities are:
596
<strong>Required</strong>: packages that are necessary for the proper
597
functioning of the system.
601
This includes all tools that are necessary to repair system defects. You must
602
not remove these packages or your system may become totally broken and you may
603
probably not even be able to use dpkg to put things back. Systems with only
604
the Required packages are probably unusable, but they do have enough
605
functionality to allow the sysadmin to boot and install more software.
612
<strong>Important</strong> packages should be found on any Unix-like system.
616
Other packages which the system will not run well or be usable without will be
617
here. This does <em>NOT</em> include Emacs or X or TeX or any other large
618
applications. These packages only constitute the bare infrastructure.
625
<strong>Standard</strong> packages are standard on any Linux system, including
626
a reasonably small but not too limited character-mode system. Tools are
627
included to be able to browse the web (using w3m), send e-mail (with mutt) and
628
download files from FTP servers.
632
This is what will install by default if users do not select anything else. It
633
does not include many large applications, but it does include the Python
634
interpreter and some server software like OpenSSH (for remote administration),
635
Exim (for mail delivery, although it can be configured for local delivery
636
only), an identd server (pidentd) and the RPC portmapper
637
(<samp>portmap</samp>). It also includes some common generic documentation
638
that most users will find helpful.
645
<strong>Optional</strong> packages include all those that you might reasonably
646
want to install if you did not know what it was, or do not have specialized
651
This includes X, a full TeX distribution, and lots of applications.
658
<strong>Extra</strong>: packages that either conflict with others with higher
659
priorities, are only likely to be useful if you already know what they are, or
660
have specialized requirements that make them unsuitable for
661
"Optional".
667
If you do a default Debian installation all the packages of priority
668
<strong>Standard</strong> or higher will be installed in your system. If you
669
select pre-defined tasks you will get lower priority packages too.
673
Additionally, some packages are marked as <strong>Essential</strong> since they
674
are absolutely necessary for the proper functioning of the system. The package
675
management tools will refuse to remove these.
680
<h2><a name="s-virtual"></a>7.8 What is a Virtual Package?</h2>
683
A virtual package is a generic name that applies to any one of a group of
684
packages, all of which provide similar basic functionality. For example, both
685
the <samp>tin</samp> and <samp>trn</samp> programs are news readers, and should
686
therefore satisfy any dependency of a program that required a news reader on a
687
system, in order to work or to be useful. They are therefore both said to
688
provide the "virtual package" called <samp>news-reader</samp>.
692
Similarly, <samp>smail</samp> and <samp>sendmail</samp> both provide the
693
functionality of a mail transport agent. They are therefore said to provide
694
the virtual package, "mail transport agent". If either one is
695
installed, then any program depending on the installation of a
696
<samp>mail-transport-agent</samp> will be satisfied by the existence of this
701
Debian provides a mechanism so that, if more than one package which provide the
702
same virtual package is installed on a system, then system administrators can
703
set one as the preferred package. The relevant command is
704
<samp>update-alternatives</samp>, and is described further in <a
705
href="ch-customizing.en.html#s-diverse">Some users like mawk, others like gawk;
706
some like vim, others like elvis; some like trn, others like tin; how does
707
Debian support diversity?, Section 11.10</a>.
712
<h2><a name="s-depends"></a>7.9 What is meant by saying that a package <em>Depends</em>, <em>Recommends</em>, <em>Suggests</em>, <em>Conflicts</em>, <em>Replaces</em> or <em>Provides</em> another package?</h2>
715
The Debian package system has a range of package "dependencies" which
716
are designed to indicate (in a single flag) the level at which Program A can
717
operate independently of the existence of Program B on a given system:
722
Package A <em>depends</em> on Package B if B absolutely must be installed in
723
order to run A. In some cases, A depends not only on B, but on a version of B.
724
In this case, the version dependency is usually a lower limit, in the sense
725
that A depends on any version of B more recent than some specified version.
732
Package A <em>recommends</em> Package B, if the package maintainer judges that
733
most users would not want A without also having the functionality provided by
741
Package A <em>suggests</em> Package B if B contains files that are related to
742
(and usually enhance) the functionality of A.
749
Package A <em>conflicts</em> with Package B when A will not operate if B is
750
installed on the system. Most often, conflicts are cases where A contains
751
files which are an improvement over those in B. "Conflicts" are
752
often combined with "replaces".
759
Package A <em>replaces</em> Package B when files installed by B are removed and
760
(in some cases) over-written by files in A.
767
Package A <em>provides</em> Package B when all of the files and functionality
768
of B are incorporated into A. This mechanism provides a way for users with
769
constrained disk space to get only that part of package A which they really
776
More detailed information on the use of each these terms can be found in the
782
<h2><a name="s-pre-depends"></a>7.10 What is meant by Pre-Depends?</h2>
785
"Pre-Depends" is a special dependency. In the case of most packages,
786
<samp>dpkg</samp> will unpack its archive file (i.e., its <samp>.deb</samp>
787
file) independently of whether or not the files on which it depends exist on
788
the system. Simplistically, unpacking means that <samp>dpkg</samp> will
789
extract the files from the archive file that were meant to be installed on your
790
file system, and put them in place. If those packages <em>depend</em> on the
791
existence of some other packages on your system, <samp>dpkg</samp> will refuse
792
to complete the installation (by executing its "configure" action)
793
until the other packages are installed.
797
However, for some packages, <samp>dpkg</samp> will refuse even to unpack them
798
until certain dependencies are resolved. Such packages are said to
799
"Pre-depend" on the presence of some other packages. The Debian
800
project provided this mechanism to support the safe upgrading of systems from
801
<samp>a.out</samp> format to <samp>ELF</samp> format, where the <em>order</em>
802
in which packages were unpacked was critical. There are other large upgrade
803
situations where this method is useful, e.g. the packages with the required
804
priority and their LibC dependency.
808
As before, more detailed information about this can be found in the Policy
814
<h2><a name="s-pkgstatus"></a>7.11 What is meant by <em>unknown</em>, <em>install</em>, <em>remove</em>, <em>purge</em> and <em>hold</em> in the package status?</h2>
817
These "want" flags tell what the user wanted to do with a package (as
818
indicated either by the user's actions in the "Select" section of
819
<samp>dselect</samp>, or by the user's direct invocations of
829
unknown - the user has never indicated whether he wants the package
836
install - the user wants the package installed or upgraded
843
remove - the user wants the package removed, but does not want to remove any
844
existing configuration files.
851
purge - the user wants the package to be removed completely, including its
859
hold - the user wants this package not to be processed, i.e., he wants to keep
860
the current version with the current status whatever that is.
867
<h2><a name="s-puttingonhold"></a>7.12 How do I put a package on hold?</h2>
870
There are three ways of holding back packages, with dpkg, aptitude or with
875
With dpkg, you have to export the list of package selections, with:
879
dpkg --get-selections \* > selections.txt
883
Then edit the resulting file <code>selections.txt</code>, change the line
884
containing the package you wish to hold, e.g. <code>libc6</code>, from this:
900
Save the file, and reload it into dpkg database with:
904
dpkg --set-selections < selections.txt
908
With aptitude, you can hold a package using
912
aptitude hold package_name
916
and remove the hold with
920
aptitude unhold package_name
924
With dselect, you have to enter the [S]elect screen, find the package you wish
925
to hold in its present state, and press the `=' key (or `H'). The changes will
926
go live immediately after you exit the [S]elect screen.
931
<h2><a name="s-sourcepkgs"></a>7.13 How do I install a source package?</h2>
934
Debian source packages can't actually be "installed", they are just
935
unpacked in whatever directory you want to build the binary packages they
940
Source packages are distributed on most of the same mirrors where you can
941
obtain the binary packages. If you set up your APT's
942
<code>sources.list(5)</code> to include the appropriate "deb-src"
943
lines, you'll be able to easily download any source packages by running
951
To help you in actually building the source package, Debian source package
952
provide the so-called build-dependencies mechanism. This means that the source
953
package maintainer keeps a list of other packages that are required to build
954
their package. To see how this is useful, run
958
apt-get build-dep foo
962
before building the source.
967
<h2><a name="s-sourcebuild"></a>7.14 How do I build binary packages from a source package?</h2>
970
The preferred way to do this is by using various wrapper tools. We'll show how
971
it's done using the <samp>devscripts</samp> tools. Install this package if you
972
haven't done so already.
976
Now, first get the source package:
984
and change to the source tree:
992
Then install needed build-dependencies (if any):
996
sudo apt-get build-dep foo
1000
Then create a dedicated version of your own build (so that you won't get
1001
confused later when Debian itself releases a new version)
1005
dch -l local 'Blah blah blah'
1009
And finally build your package
1017
If everything worked out fine, you should now be able to install your package
1022
sudo dpkg -i ../*.deb
1026
If you prefer to do things manually, and don't want to use
1027
<samp>devscripts</samp>, follow this procedure:
1031
You will need all of foo_*.dsc, foo_*.tar.gz and foo_*.diff.gz to compile the
1032
source (note: there is no .diff.gz for some packages that are native to
1037
Once you have them (<a href="#s-sourcepkgs">How do I install a source package?,
1038
Section 7.13</a>), if you have the <code>dpkg-dev</code> package installed, the
1043
dpkg-source -x foo_version-revision.dsc
1047
will extract the package into a directory called <samp>foo-version</samp>.
1051
If you want just to compile the package, you may cd into
1052
<samp>foo-version</samp> directory and issue the command
1056
dpkg-buildpackage -rfakeroot -b
1060
to build the package (note that this also requires the <code>fakeroot</code>
1065
dpkg -i ../foo_version-revision_arch.deb
1069
to install the newly-built package(s).
1074
<h2><a name="s-creatingdebs"></a>7.15 How do I create Debian packages myself?</h2>
1077
For a more detailed description on this, read the New Maintainers' Guide,
1078
available in the <code>maint-guide</code> package, or at <code><a
1079
href="http://www.debian.org/doc/devel-manuals#maint-guide">http://www.debian.org/doc/devel-manuals#maint-guide</a></code>.
1085
[ <a href="ch-ftparchives.en.html">previous</a> ]
1086
[ <a href="index.en.html#contents">Contents</a> ]
1087
[ <a href="ch-basic_defs.en.html">1</a> ]
1088
[ <a href="ch-getting.en.html">2</a> ]
1089
[ <a href="ch-choosing.en.html">3</a> ]
1090
[ <a href="ch-compat.en.html">4</a> ]
1091
[ <a href="ch-software.en.html">5</a> ]
1092
[ <a href="ch-ftparchives.en.html">6</a> ]
1094
[ <a href="ch-pkgtools.en.html">8</a> ]
1095
[ <a href="ch-uptodate.en.html">9</a> ]
1096
[ <a href="ch-kernel.en.html">10</a> ]
1097
[ <a href="ch-customizing.en.html">11</a> ]
1098
[ <a href="ch-support.en.html">12</a> ]
1099
[ <a href="ch-contributing.en.html">13</a> ]
1100
[ <a href="ch-redistrib.en.html">14</a> ]
1101
[ <a href="ch-nexttime.en.html">15</a> ]
1102
[ <a href="ch-faqinfo.en.html">16</a> ]
1103
[ <a href="ch-pkgtools.en.html">next</a> ]
1109
The Debian GNU/Linux FAQ
1113
version 4.0.3, 6 August 2008<br>
1115
Authors are listed at <a href="ch-faqinfo.en.html#s-authors">Debian FAQ Authors</a><br>