summaryrefslogtreecommitdiff
path: root/templates/iso/doc/FAQ/html/ch-uptodate.en.html
blob: b271f29f7d81f7177692c1a580d4d926af67aaa4 (plain)
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

<title>The Debian GNU/Linux FAQ - Keeping your Debian system up-to-date</title>

</head>

<body>

<p><a name="ch-uptodate"></a></p>
<hr>

<p>
[ <a href="ch-pkgtools.en.html">previous</a> ]
[ <a href="index.en.html#contents">Contents</a> ]
[ <a href="ch-basic_defs.en.html">1</a> ]
[ <a href="ch-getting.en.html">2</a> ]
[ <a href="ch-compat.en.html">3</a> ]
[ <a href="ch-software.en.html">4</a> ]
[ <a href="ch-ftparchives.en.html">5</a> ]
[ <a href="ch-pkg_basics.en.html">6</a> ]
[ <a href="ch-pkgtools.en.html">7</a> ]
[ 8 ]
[ <a href="ch-kernel.en.html">9</a> ]
[ <a href="ch-customizing.en.html">10</a> ]
[ <a href="ch-support.en.html">11</a> ]
[ <a href="ch-contributing.en.html">12</a> ]
[ <a href="ch-redistrib.en.html">13</a> ]
[ <a href="ch-nexttime.en.html">14</a> ]
[ <a href="ch-faqinfo.en.html">15</a> ]
[ <a href="ch-kernel.en.html">next</a> ]
</p>

<hr>

<h1>
The Debian GNU/Linux FAQ
<br>Chapter 8 - Keeping your Debian system up-to-date
</h1>

<hr>

<p>
A Debian goal is to provide a consistent upgrade path and a secure upgrade
process.  We always do our best to make upgrading to new releases a smooth
procedure.  In case there's some important note to add to the upgrade process,
the packages will alert the user, and often provide a solution to a possible
problem.
</p>

<p>
You should also read the Release Notes document that describes the details of
specific upgrades.  It is shipped on all Debian CDs and available on the WWW at
<code><a
href="http://www.debian.org/releases/stable/releasenotes">http://www.debian.org/releases/stable/releasenotes</a></code>.
</p>

<hr>

<h2><a name="s-libc5to6upgrade"></a>8.1 How can I upgrade my Debian 1.3.1 (or earlier) distribution, based on libc5, to 2.0 (or later), based on libc6?</h2>

<p>
There are several ways to upgrade:
</p>
<ul>
<li>
<p>
Using a simple shell script called <samp>autoup.sh</samp> which upgrades the
most important packages.  After <samp>autoup.sh</samp> has done his job, you
may use dselect to install the remaining packages <em>en masse</em>.  This is
probably the recommended method, but not the only one.
</p>

<p>
Currently, the latest release of <samp>autoup.sh</samp> may be found on the
following locations:
</p>
<ul>
<li>
<p>
<code><a
href="http://www.debian.org/releases/2.0/autoup/">http://www.debian.org/releases/2.0/autoup/</a></code>
</p>
</li>
</ul>
<ul>
<li>
<p>
<code><a
href="http://www.taz.net.au/autoup/">http://www.taz.net.au/autoup/</a></code>
</p>
</li>
</ul>
<ul>
<li>
<p>
<code><a
href="http://debian.vicnet.net.au/autoup/">http://debian.vicnet.net.au/autoup/</a></code>
</p>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<p>
Following closely the <code><a
href="http://debian.vicnet.net.au/autoup/HOWTO/libc5-libc6-Mini-HOWTO.html">Debian
libc5 to libc6 Mini-HOWTO</a></code> and upgrade the most important packages by
hand.  <samp>autoup.sh</samp> is based on this Mini-HOWTO, so this method
should work more or less like using <samp>autoup.sh</samp>.
</p>
</li>
</ul>
<ul>
<li>
<p>
Using a libc5-based <samp>apt</samp>.  APT stands for Advanced Package Tool,
and it might replace dselect some day.  Currently, it works just as a
command-line interface, or as a dselect access method.  You will find a libc5
version in the <samp>dists/slink/main/upgrade-older-i386</samp> directory at
the Debian archives.
</p>
</li>
</ul>
<ul>
<li>
<p>
Using just dselect, without upgrading any package by hand first.  It is highly
recommended that you do NOT use this method if you can avoid it, because
dselect alone currently does not install packages in the optimal order.  APT
works much better and it is safer.
</p>
</li>
</ul>

<hr>

<h2><a name="s-howtocurrent"></a>8.2 How can I keep my Debian system current?</h2>

<p>
One could simply execute an anonymous ftp call to a Debian archive, then peruse
the directories until one finds the desired file, and then fetch it, and
finally install it using <samp>dpkg</samp>.  Note that <samp>dpkg</samp> will
install upgrade files in place, even on a running system.  Sometimes, a revised
package will require the installation of a newly revised version of another
package, in which case the installation will fail until/unless the other
package is installed.
</p>

<p>
Many people find this approach much too time-consuming, since Debian evolves so
quickly -- typically, a dozen or more new packages are uploaded every week.
This number is larger just before a new major release.  To deal with this
avalanche, many people prefer to use a more automated method.  Several
different packages are available for this purpose:
</p>

<hr>

<h3><a name="s-aptitude-upgrade"></a>8.2.1 aptitude</h3>

<p>
APT is an advanced interface to the Debian packaging system.  It features
complete installation ordering, multiple source capability and several other
unique features, see the User's Guide in
<samp>/usr/share/doc/apt-doc/guide.html/index.html</samp> (you will have to
install the <samp>apt-doc</samp> package).
</p>

<p>
<code>aptitude</code> is the recommended package manager for Debian GNU/Linux
systems.  It is a text-based interface to APT using the curses library, and can
be used to perform management tasks in a fast and easy way.
</p>

<p>
Before you can use <code>aptitude</code>, you'll have to edit the
<samp>/etc/apt/sources.list</samp> file to set it up.  If you wish to upgrade
to the latest stable version of Debian, you'll probably want to use a source
like this one:
</p>

<pre>
     http://http.us.debian.org/debian stable main contrib non-free
</pre>

<p>
You can replace http.us.debian.org with the name of a faster Debian mirror near
you.  See the mirror list at <code><a
href="http://www.debian.org/misc/README.mirrors">http://www.debian.org/misc/README.mirrors</a></code>
for more information.
</p>

<p>
More details on this can be found in the <code>sources.list(8)</code> manual
page.
</p>

<p>
To update your system, run
</p>

<pre>
     aptitude update
</pre>

<p>
followed by
</p>

<pre>
     aptitude dist-upgrade
</pre>

<p>
Answer any questions that might come up, and your system will be upgraded.  See
also <a href="ch-pkgtools.en.html#s-aptitude">aptitude, Section 7.1.3</a>.
</p>

<hr>

<h3><a name="s-apt"></a>8.2.2 apt-get, dselect and apt-cdrom</h3>

<p>
<code>apt-get</code> is an APT-based command-line tool for handling packages,
and the APT dselect method is an interface to APT through <code>dselect</code>.
Both of these provide a simple, safe way to install and upgrade packages.
</p>

<p>
To use <code>apt-get</code>, install the <code>apt</code> package, and edit the
<samp>/etc/apt/sources.list</samp> file to set it up, just as for <a
href="#s-aptitude-upgrade">aptitude, Section 8.2.1</a>.
</p>

<p>
Then run
</p>

<pre>
     apt-get update
</pre>

<p>
followed by
</p>

<pre>
     apt-get dist-upgrade
</pre>

<p>
Answer any questions that might come up, and your system will be upgraded.  See
also the <code>apt-get(8)</code> manual page, as well as <a
href="ch-pkgtools.en.html#s-apt-get">APT, Section 7.1.2</a>.
</p>

<p>
To use APT with <code>dselect</code>, choose the APT access method in dselect's
method selection screen (option 0) and then specify the sources that should be
used.  The configuration file is <code>/etc/apt/sources.list</code>.  See also
<a href="ch-pkgtools.en.html#s-dselect">dselect, Section 7.1.4</a>.
</p>

<p>
If you want to use CDs to install packages, you can use <code>apt-cdrom</code>.
For details, please see the Release Notes, section &quot;Setting up for an
upgrade from a local mirror&quot;.
</p>

<p>
Please note that when you get and install the packages, you'll still have them
kept in your /var directory hierarchy.  To keep your partition from
overflowing, remember to delete extra files using <samp>apt-get clean</samp>
and <samp>apt-get autoclean</samp>, or to move them someplace else (hint: use
<code>apt-move</code>).
</p>

<hr>

<h3><a name="s-dpkg-ftp"></a>8.2.3 dpkg-ftp</h3>

<p>
This is an older access method for <code>dselect</code>.  It can be invoked
from within <code>dselect</code>, thereby allowing a user the ability to
download files and install them directly in one step.  To do this, select the
<samp>ftp</samp> access method in <code>dselect</code> (option 0) and specify
the remote host name and directory.  <code>dpkg-ftp</code> will then
automatically download the files that are selected (either in this session of
<code>dselect</code> or earlier ones).
</p>

<p>
Note that, unlike the <code>mirror</code> program, <code>dpkg-ftp</code> does
not grab everything at a mirror site.  Rather, it downloads only those files
which you have selected (when first starting up <code>dpkg-ftp</code>), and
which need to be updated.
</p>

<p>
<code>dpkg-ftp</code> is somewhat obsolete.  You should use the APT access
method with ftp:// URLs in <code>sources.list</code> instead.
</p>

<hr>

<h3><a name="s-mirror"></a>8.2.4 mirror</h3>

<p>
This Perl script, and its (optional) manager program called
<code>mirror-master</code>, can be used to fetch user-specified parts of a
directory tree from a specified host <em>via</em> anonymous FTP.
</p>

<p>
<code>mirror</code> is particularly useful for downloading large volumes of
software.  After the first time files have been downloaded from a site, a file
called <samp>.mirrorinfo</samp> is stored on the local host.  Changes to the
remote file system are tracked automatically by <code>mirror</code>, which
compares this file to a similar file on the remote system and downloads only
changed files.
</p>

<p>
The <code>mirror</code> program is generally useful for updating local copies
of remote directory trees.  The files fetched need not be Debian files.  (Since
<code>mirror</code> is a Perl script, it can also run on non-Unix systems.)
Though the <code>mirror</code> program provides mechanisms for excluding files
names of which match user-specified strings, this program is most useful when
the objective is to download whole directory trees, rather than selected
packages.
</p>

<hr>

<h3><a name="s-dpkg-mountable"></a>8.2.5 dpkg-mountable</h3>

<p>
dpkg-mountable adds an access method called `mountable' to dselect's list,
which allows you to install from any file system specified in /etc/fstab.  For
example, the archive could be a normal hard disk partition or an NFS server,
which it will automatically mount and umount for you if necessary.
</p>

<p>
It also has some extra features not found in the standard dselect methods, such
as provision for a local file tree (either parallel to the main distribution or
totally separate), and only getting packages which are required, rather than
the time-consuming recursive directory scan, as well as logging of all dpkg
actions in the install method.
</p>

<hr>

<h2><a name="s-upgradesingle"></a>8.3 Must I go into single user mode in order to upgrade a package?</h2>

<p>
No.  Packages can be upgraded in place, even in running systems.  Debian has a
<samp>start-stop-daemon</samp> program that is invoked to stop, then restart
running process if necessary during a package upgrade.
</p>

<hr>

<h2><a name="s-savedebs"></a>8.4 Do I have to keep all those .deb archive files on my disk?</h2>

<p>
No.  If you have downloaded the files to your disk (which is not absolutely
necessary, see above for the description of dpkg-ftp), then after you have
installed the packages, you can remove them from your system.
</p>

<hr>

<h2><a name="s-keepingalog"></a>8.5 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!</h2>

<p>
Passing the <samp>--log</samp>-option to <code>dpkg</code> makes
<code>dpkg</code> log status change updates and actions.  It logs both the
<code>dpkg</code>-invokation (e.g.
</p>

<pre>
     2005-12-30 18:10:33 install hello 1.3.18 2.1.1-4
</pre>

<p>
) and the results (e.g.
</p>

<pre>
     2005-12-30 18:10:35 status installed hello 2.1.1-4
</pre>

<p>
) If you'd like to log all your <code>dpkg</code> invokations (even those done
using frontends like <code>aptitude</code>), you could add
</p>

<pre>
     log /var/log/dpkg.log
</pre>

<p>
to your <code>/etc/dpkg/dpkg.cfg</code>.  Be sure the created logfile gets
rotated periodically.  If you're using <code>logrotate</code>, this can be
achieved by creating a file <code>/etc/logrotate.d/dpkg</code> with contents
</p>

<pre>
     /var/log/dpkg {
       missingok
       notifempty
     }
</pre>

<p>
More details on <code>dpkg</code> logging can be found in the
<code>dpkg(1)</code> manual page.
</p>

<p>
<code>aptitude</code> logs the package installations, removals, and upgrades
that it intends to perform to <code>/var/log/aptitude</code>.  Note that the
<em>results</em> of those actions are not recorded in this file!
</p>

<p>
Another way to record your actions is to run your package management session
within the <code>script(1)</code> program.
</p>

<hr>

<p>
[ <a href="ch-pkgtools.en.html">previous</a> ]
[ <a href="index.en.html#contents">Contents</a> ]
[ <a href="ch-basic_defs.en.html">1</a> ]
[ <a href="ch-getting.en.html">2</a> ]
[ <a href="ch-compat.en.html">3</a> ]
[ <a href="ch-software.en.html">4</a> ]
[ <a href="ch-ftparchives.en.html">5</a> ]
[ <a href="ch-pkg_basics.en.html">6</a> ]
[ <a href="ch-pkgtools.en.html">7</a> ]
[ 8 ]
[ <a href="ch-kernel.en.html">9</a> ]
[ <a href="ch-customizing.en.html">10</a> ]
[ <a href="ch-support.en.html">11</a> ]
[ <a href="ch-contributing.en.html">12</a> ]
[ <a href="ch-redistrib.en.html">13</a> ]
[ <a href="ch-nexttime.en.html">14</a> ]
[ <a href="ch-faqinfo.en.html">15</a> ]
[ <a href="ch-kernel.en.html">next</a> ]
</p>

<hr>

<p>
The Debian GNU/Linux FAQ
</p>

<address>
version 3.1.3, 25 April 2006<br>
<br>
Authors are listed at <a href="ch-faqinfo.en.html#s-authors">Debian FAQ Authors</a><br>
<br>
</address>
<hr>

</body>

</html>