]>
Commit | Line | Data |
---|---|---|
24f6490f AL |
1 | <?xml version="1.0" encoding="utf-8" standalone="no"?> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ | |
b2e465d6 AL |
4 | |
5 | <!ENTITY % aptent SYSTEM "apt.ent"> | |
6 | %aptent; | |
7 | ||
8 | ]> | |
9 | ||
10 | <refentry> | |
ec2853a7 | 11 | |
b2e465d6 | 12 | <refmeta> |
24f6490f AL |
13 | <refentrytitle>apt_preferences</refentrytitle> |
14 | <manvolnum>5</manvolnum> | |
b2e465d6 | 15 | </refmeta> |
ec2853a7 | 16 | |
b2e465d6 AL |
17 | <!-- Man page title --> |
18 | <refnamediv> | |
24f6490f AL |
19 | <refname>apt_preferences</refname> |
20 | <refpurpose>Preference control file for APT</refpurpose> | |
b2e465d6 | 21 | </refnamediv> |
b2e465d6 | 22 | |
24f6490f AL |
23 | <refsect1> |
24 | <title>Description</title> | |
25 | <para>The APT preferences file <filename>/etc/apt/preferences</filename> | |
5b9d504e | 26 | can be used to control which versions of packages will be selected |
24f6490f | 27 | for installation.</para> |
ec2853a7 | 28 | |
24f6490f | 29 | <para>Several versions of a package may be available for installation when |
ec2853a7 | 30 | the &sources-list; file contains references to more than one distribution |
5b9d504e AL |
31 | (for example, <literal>stable</literal> and <literal>testing</literal>). |
32 | APT assigns a priority to each version that is available. | |
33 | Subject to dependency constraints, <command>apt-get</command> selects the | |
408a8e0a | 34 | version with the highest priority for installation. |
5b9d504e AL |
35 | The APT preferences file overrides the priorities that APT assigns to |
36 | package versions by default, thus giving the user control over which | |
24f6490f AL |
37 | one is selected for installation.</para> |
38 | ||
39 | <para>Several instances of the same version of a package may be available when | |
408a8e0a AL |
40 | the &sources-list; file contains references to more than one source. |
41 | In this case <command>apt-get</command> downloads the instance listed | |
5b9d504e | 42 | earliest in the &sources-list; file. |
408a8e0a | 43 | The APT preferences file does not affect the choice of instance, only |
24f6490f | 44 | the choice of version.</para> |
ec2853a7 | 45 | |
24f6490f | 46 | <refsect2><title>APT's Default Priority Assignments</title> |
ec2853a7 | 47 | |
24f6490f | 48 | <para>If there is no preferences file or if there is no entry in the file |
408a8e0a AL |
49 | that applies to a particular version then the priority assigned to that |
50 | version is the priority of the distribution to which that version | |
51 | belongs. It is possible to single out a distribution, "the target release", | |
52 | which receives a higher priority than other distributions do by default. | |
53 | The target release can be set on the <command>apt-get</command> command | |
54 | line or in the APT configuration file <filename>/etc/apt/apt.conf</filename>. | |
55 | For example, | |
24f6490f | 56 | |
408a8e0a AL |
57 | <programlisting> |
58 | <command>apt-get install -t testing <replaceable>some-package</replaceable></command> | |
59 | </programlisting> | |
60 | <programlisting> | |
61 | APT::Default-Release "stable"; | |
62 | </programlisting> | |
ec2853a7 AL |
63 | </para> |
64 | ||
24f6490f | 65 | <para>If the target release has been specified then APT uses the following |
408a8e0a | 66 | algorithm to set the priorities of the versions of a package. Assign: |
24f6490f | 67 | |
ec2853a7 AL |
68 | <variablelist> |
69 | <varlistentry> | |
70 | <term>priority 100</term> | |
5b9d504e | 71 | <listitem><simpara>to the version that is already installed (if any).</simpara></listitem> |
ec2853a7 | 72 | </varlistentry> |
24f6490f | 73 | |
ec2853a7 AL |
74 | <varlistentry> |
75 | <term>priority 500</term> | |
5b9d504e | 76 | <listitem><simpara>to the versions that are not installed and do not belong to the target release.</simpara></listitem> |
ec2853a7 | 77 | </varlistentry> |
24f6490f | 78 | |
ec2853a7 AL |
79 | <varlistentry> |
80 | <term>priority 990</term> | |
5b9d504e | 81 | <listitem><simpara>to the versions that are not installed and belong to the target release.</simpara></listitem> |
ec2853a7 AL |
82 | </varlistentry> |
83 | </variablelist> | |
84 | </para> | |
85 | ||
24f6490f | 86 | <para>If the target release has not been specified then APT simply assigns |
5b9d504e | 87 | priority 100 to all installed package versions and priority 500 to all |
24f6490f | 88 | uninstalled package versions.</para> |
ec2853a7 | 89 | |
24f6490f | 90 | <para>APT then applies the following rules, listed in order of precedence, |
5b9d504e | 91 | to determine which version of a package to install. |
ec2853a7 | 92 | <itemizedlist> |
5b9d504e AL |
93 | <listitem><simpara>Never downgrade unless the priority of an available |
94 | version exceeds 1000. ("Downgrading" is installing a less recent version | |
95 | of a package in place of a more recent version. Note that none of APT's | |
96 | default priorities exceeds 1000; such high priorities can only be set in | |
97 | the preferences file. Note also that downgrading a package | |
98 | can be risky.)</simpara></listitem> | |
99 | <listitem><simpara>Install the highest priority version.</simpara></listitem> | |
100 | <listitem><simpara>If two or more versions have the same priority, | |
101 | install the most recent one (that is, the one with the higher version | |
102 | number).</simpara></listitem> | |
103 | <listitem><simpara>If two or more versions have the same priority and | |
104 | version number but either the packages differ in some of their metadata or the | |
24f6490f | 105 | <literal>--reinstall</literal> option is given, install the uninstalled one.</simpara></listitem> |
ec2853a7 AL |
106 | </itemizedlist> |
107 | </para> | |
108 | ||
24f6490f | 109 | <para>In a typical situation, the installed version of a package (priority 100) |
5b9d504e AL |
110 | is not as recent as one of the versions available from the sources listed in |
111 | the &sources-list; file (priority 500 or 990). Then the package will be upgraded | |
112 | when <command>apt-get install <replaceable>some-package</replaceable></command> | |
113 | or <command>apt-get upgrade</command> is executed. | |
ec2853a7 AL |
114 | </para> |
115 | ||
24f6490f | 116 | <para>More rarely, the installed version of a package is <emphasis>more</emphasis> recent |
5b9d504e AL |
117 | than any of the other available versions. The package will not be downgraded |
118 | when <command>apt-get install <replaceable>some-package</replaceable></command> | |
24f6490f | 119 | or <command>apt-get upgrade</command> is executed.</para> |
ec2853a7 | 120 | |
24f6490f | 121 | <para>Sometimes the installed version of a package is more recent than the |
ec2853a7 | 122 | version belonging to the target release, but not as recent as a version |
5b9d504e AL |
123 | belonging to some other distribution. Such a package will indeed be upgraded |
124 | when <command>apt-get install <replaceable>some-package</replaceable></command> | |
125 | or <command>apt-get upgrade</command> is executed, | |
24f6490f AL |
126 | because at least <emphasis>one</emphasis> of the available versions has a higher |
127 | priority than the installed version.</para> | |
128 | </refsect2> | |
ec2853a7 | 129 | |
24f6490f | 130 | <refsect2><title>The Effect of APT Preferences</title> |
ec2853a7 | 131 | |
24f6490f | 132 | <para>The APT preferences file allows the system administrator to control the |
5b9d504e AL |
133 | assignment of priorities. The file consists of one or more multi-line records |
134 | separated by blank lines. Records can have one of two forms, a specific form | |
135 | and a general form. | |
ec2853a7 AL |
136 | <itemizedlist> |
137 | <listitem> | |
24f6490f | 138 | <simpara>The specific form assigns a priority (a "Pin-Priority") to a |
5b9d504e AL |
139 | specified package and specified version or version range. For example, |
140 | the following record assigns a high priority to all versions of | |
24f6490f | 141 | the <filename>perl</filename> package whose version number begins with "<literal>5.8</literal>".</simpara> |
ec2853a7 AL |
142 | |
143 | <programlisting> | |
144 | Package: perl | |
145 | Pin: version 5.8* | |
146 | Pin-Priority: 1001 | |
147 | </programlisting> | |
148 | </listitem> | |
149 | ||
24f6490f | 150 | <listitem><simpara>The general form assigns a priority to all of the package versions in a |
ec2853a7 | 151 | given distribution (that is, to all the versions of packages that are |
24f6490f | 152 | listed in a certain <filename>Release</filename> file) or to all of the package |
5b9d504e | 153 | versions coming from a particular Internet site, as identified by the |
24f6490f | 154 | site's fully qualified domain name.</simpara> |
ec2853a7 | 155 | |
24f6490f | 156 | <simpara>This general-form entry in the APT preferences file applies only |
5b9d504e | 157 | to groups of packages. For example, the following record assigns a high |
24f6490f | 158 | priority to all package versions available from the local site.</simpara> |
ec2853a7 AL |
159 | |
160 | <programlisting> | |
161 | Package: * | |
162 | Pin: origin "" | |
163 | Pin-Priority: 999 | |
164 | </programlisting> | |
165 | ||
24f6490f | 166 | <simpara>A note of caution: the keyword used here is "<literal>origin</literal>". |
5b9d504e | 167 | This should not be confused with the Origin of a distribution as |
24f6490f AL |
168 | specified in a <filename>Release</filename> file. What follows the "Origin:" tag |
169 | in a <filename>Release</filename> file is not an Internet address | |
170 | but an author or vendor name, such as "Debian" or "Ximian".</simpara> | |
ec2853a7 | 171 | |
24f6490f AL |
172 | <simpara>The following record assigns a low priority to all package versions |
173 | belonging to any distribution whose Archive name is "<literal>unstable</literal>".</simpara> | |
ec2853a7 AL |
174 | |
175 | <programlisting> | |
176 | Package: * | |
177 | Pin: release a=unstable | |
178 | Pin-Priority: 50 | |
179 | </programlisting> | |
180 | ||
24f6490f AL |
181 | <simpara>The following record assigns a high priority to all package versions |
182 | belonging to any release whose Archive name is "<literal>stable</literal>" | |
183 | and whose release Version number is "<literal>3.0</literal>".</simpara> | |
ec2853a7 AL |
184 | |
185 | <programlisting> | |
186 | Package: * | |
187 | Pin: release a=unstable, v=3.0 | |
188 | Pin-Priority: 50 | |
189 | </programlisting> | |
190 | </listitem> | |
191 | </itemizedlist> | |
192 | </para> | |
193 | ||
24f6490f | 194 | </refsect2> |
ec2853a7 | 195 | |
24f6490f AL |
196 | <refsect2> |
197 | <title>How APT Interprets Priorities</title> | |
ec2853a7 | 198 | |
5b9d504e AL |
199 | <para> |
200 | Priorities (P) assigned in the APT preferences file must be positive | |
ec2853a7 AL |
201 | or negative integers. They are interpreted as follows (roughly speaking): |
202 | ||
203 | <variablelist> | |
5b9d504e AL |
204 | <varlistentry> |
205 | <term>P > 1000</term> | |
206 | <listitem><simpara>causes a version to be installed even if this | |
207 | constitutes a downgrade of the package</simpara></listitem> | |
ec2853a7 | 208 | </varlistentry> |
5b9d504e AL |
209 | <varlistentry> |
210 | <term>990 < P <=1000</term> | |
211 | <listitem><simpara>causes a version to be installed | |
ec2853a7 | 212 | even if it does not come from the target release, |
5b9d504e | 213 | unless the installed version is more recent</simpara></listitem> |
ec2853a7 | 214 | </varlistentry> |
5b9d504e AL |
215 | <varlistentry> |
216 | <term>500 < P <=990</term> | |
217 | <listitem><simpara>causes a version to be installed | |
218 | unless there is a version available belonging to the target release | |
219 | or the installed version is more recent</simpara></listitem> | |
ec2853a7 | 220 | </varlistentry> |
5b9d504e AL |
221 | <varlistentry> |
222 | <term>100 < P <=500</term> | |
223 | <listitem><simpara>causes a version to be installed | |
224 | unless there is a version available belonging to some other | |
225 | distribution or the installed version is more recent</simpara></listitem> | |
24f6490f | 226 | </varlistentry> |
5b9d504e | 227 | <varlistentry> |
56298634 | 228 | <term>0 < P <=100</term> |
5b9d504e AL |
229 | <listitem><simpara>causes a version to be installed |
230 | only if there is no installed version of the package</simpara></listitem> | |
ec2853a7 | 231 | </varlistentry> |
5b9d504e AL |
232 | <varlistentry> |
233 | <term>P < 0</term> | |
234 | <listitem><simpara>prevents the version from being installed</simpara></listitem> | |
ec2853a7 AL |
235 | </varlistentry> |
236 | </variablelist> | |
237 | </para> | |
238 | ||
24f6490f | 239 | <para>If any specific-form records match an available package version then the |
5b9d504e AL |
240 | first such record determines the priority of the package version. |
241 | Failing that, | |
242 | if any general-form records match an available package version then the | |
24f6490f | 243 | first such record determines the priority of the package version.</para> |
ec2853a7 | 244 | |
24f6490f AL |
245 | <para>For example, suppose the APT preferences file contains the three |
246 | records presented earlier:</para> | |
ec2853a7 AL |
247 | |
248 | <programlisting> | |
249 | Package: perl | |
250 | Pin: version 5.8* | |
b2e465d6 | 251 | Pin-Priority: 1001 |
ec2853a7 | 252 | |
b2e465d6 | 253 | Package: * |
ec2853a7 AL |
254 | Pin: origin "" |
255 | Pin-Priority: 999 | |
256 | ||
257 | Package: * | |
258 | Pin: release unstable | |
259 | Pin-Priority: 50 | |
260 | </programlisting> | |
261 | ||
24f6490f | 262 | <para>Then: |
ec2853a7 | 263 | <itemizedlist> |
24f6490f | 264 | <listitem><simpara>The most recent available version of the <literal>perl</literal> |
ec2853a7 | 265 | package will be installed, so long as that version's version number begins |
24f6490f AL |
266 | with "<literal>5.8</literal>". If <emphasis>any</emphasis> 5.8* version of <literal>perl</literal> is |
267 | available and the installed version is 5.9*, then <literal>perl</literal> will be | |
ec2853a7 | 268 | downgraded.</simpara></listitem> |
24f6490f | 269 | <listitem><simpara>A version of any package other than <literal>perl</literal> |
5b9d504e AL |
270 | that is available from the local system has priority over other versions, |
271 | even versions belonging to the target release. | |
ec2853a7 | 272 | </simpara></listitem> |
5b9d504e AL |
273 | <listitem><simpara>A version of a package whose origin is not the local |
274 | system but some other site listed in &sources-list; and which belongs to | |
24f6490f | 275 | an <literal>unstable</literal> distribution is only installed if it is selected |
5b9d504e | 276 | for installation and no version of the package is already installed. |
ec2853a7 AL |
277 | </simpara></listitem> |
278 | </itemizedlist> | |
279 | </para> | |
24f6490f | 280 | </refsect2> |
ec2853a7 | 281 | |
24f6490f AL |
282 | <refsect2> |
283 | <title>Determination of Package Version and Distribution Properties</title> | |
ec2853a7 | 284 | |
24f6490f | 285 | <para>The locations listed in the &sources-list; file should provide |
ec2853a7 | 286 | <filename>Packages</filename> and <filename>Release</filename> files |
24f6490f | 287 | to describe the packages available at that location. </para> |
ec2853a7 | 288 | |
24f6490f | 289 | <para>The <filename>Packages</filename> file is normally found in the directory |
ec2853a7 AL |
290 | <filename>.../dists/<replaceable>dist-name</replaceable>/<replaceable>component</replaceable>/<replaceable>arch</replaceable></filename>: |
291 | for example, <filename>.../dists/stable/main/binary-i386/Packages</filename>. | |
292 | It consists of a series of multi-line records, one for each package available | |
293 | in that directory. Only two lines in each record are relevant for setting | |
294 | APT priorities: | |
295 | <variablelist> | |
296 | <varlistentry> | |
24f6490f | 297 | <term>the <literal>Package:</literal> line</term> |
ec2853a7 AL |
298 | <listitem><simpara>gives the package name</simpara></listitem> |
299 | </varlistentry> | |
300 | <varlistentry> | |
24f6490f | 301 | <term>the <literal>Version:</literal> line</term> |
ec2853a7 AL |
302 | <listitem><simpara>gives the version number for the named package</simpara></listitem> |
303 | </varlistentry> | |
304 | </variablelist> | |
305 | </para> | |
306 | ||
24f6490f | 307 | <para>The <filename>Release</filename> file is normally found in the directory |
ec2853a7 AL |
308 | <filename>.../dists/<replaceable>dist-name</replaceable></filename>: |
309 | for example, <filename>.../dists/stable/Release</filename>, | |
310 | or <filename>.../dists/woody/Release</filename>. | |
24f6490f | 311 | It consists of a single multi-line record which applies to <emphasis>all</emphasis> of |
5b9d504e | 312 | the packages in the directory tree below its parent. Unlike the |
24f6490f | 313 | <filename>Packages</filename> file, nearly all of the lines in a <filename>Release</filename> |
ec2853a7 AL |
314 | file are relevant for setting APT priorities: |
315 | ||
316 | <variablelist> | |
317 | <varlistentry> | |
24f6490f | 318 | <term>the <literal>Archive:</literal> line</term> |
5b9d504e | 319 | <listitem><simpara>names the archive to which all the packages |
ec2853a7 | 320 | in the directory tree belong. For example, the line |
5b9d504e AL |
321 | "Archive: stable" |
322 | specifies that all of the packages in the directory | |
24f6490f AL |
323 | tree below the parent of the <filename>Release</filename> file are in a |
324 | <literal>stable</literal> archive. Specifying this value in the APT preferences file | |
ec2853a7 AL |
325 | would require the line: |
326 | </simpara> | |
ec2853a7 AL |
327 | <programlisting> |
328 | Pin: release a=stable | |
329 | </programlisting> | |
330 | </listitem> | |
331 | </varlistentry> | |
332 | ||
333 | <varlistentry> | |
24f6490f | 334 | <term>the <literal>Version:</literal> line</term> |
ec2853a7 | 335 | <listitem><simpara>names the release version. For example, the |
5b9d504e AL |
336 | packages in the tree might belong to Debian GNU/Linux release |
337 | version 3.0. Note that there is normally no version number for the | |
24f6490f | 338 | <literal>testing</literal> and <literal>unstable</literal> distributions because they |
5b9d504e AL |
339 | have not been released yet. Specifying this in the APT preferences |
340 | file would require one of the following lines. | |
ec2853a7 AL |
341 | </simpara> |
342 | ||
343 | <programlisting> | |
344 | Pin: release v=3.0 | |
f6271220 | 345 | Pin: release a=stable, v=3.0 |
ec2853a7 AL |
346 | Pin: release 3.0 |
347 | </programlisting> | |
348 | ||
349 | </listitem> | |
350 | </varlistentry> | |
351 | ||
352 | <varlistentry> | |
24f6490f | 353 | <term>the <literal>Component:</literal> line</term> |
ec2853a7 | 354 | <listitem><simpara>names the licensing component associated with the |
24f6490f | 355 | packages in the directory tree of the <filename>Release</filename> file. |
5b9d504e | 356 | For example, the line "Component: main" specifies that |
24f6490f | 357 | all the packages in the directory tree are from the <literal>main</literal> |
5b9d504e AL |
358 | component, which entails that they are licensed under terms listed |
359 | in the Debian Free Software Guidelines. Specifying this component | |
360 | in the APT preferences file would require the line: | |
ec2853a7 | 361 | </simpara> |
ec2853a7 AL |
362 | <programlisting> |
363 | Pin: release c=main | |
364 | </programlisting> | |
365 | </listitem> | |
366 | </varlistentry> | |
367 | ||
368 | <varlistentry> | |
24f6490f | 369 | <term>the <literal>Origin:</literal> line</term> |
5b9d504e | 370 | <listitem><simpara>names the originator of the packages in the |
24f6490f AL |
371 | directory tree of the <filename>Release</filename> file. Most commonly, this is |
372 | <literal>Debian</literal>. Specifying this origin in the APT preferences file | |
ec2853a7 AL |
373 | would require the line: |
374 | </simpara> | |
ec2853a7 AL |
375 | <programlisting> |
376 | Pin: release o=Debian | |
377 | </programlisting> | |
378 | </listitem> | |
379 | </varlistentry> | |
380 | ||
381 | <varlistentry> | |
24f6490f | 382 | <term>the <literal>Label:</literal> line</term> |
5b9d504e | 383 | <listitem><simpara>names the label of the packages in the directory tree |
24f6490f AL |
384 | of the <filename>Release</filename> file. Most commonly, this is |
385 | <literal>Debian</literal>. Specifying this label in the APT preferences file | |
ec2853a7 AL |
386 | would require the line: |
387 | </simpara> | |
ec2853a7 AL |
388 | <programlisting> |
389 | Pin: release l=Debian | |
390 | </programlisting> | |
391 | </listitem> | |
392 | </varlistentry> | |
393 | </variablelist> | |
394 | </para> | |
395 | ||
24f6490f | 396 | <para>All of the <filename>Packages</filename> and <filename>Release</filename> |
5b9d504e | 397 | files retrieved from locations listed in the &sources-list; file are stored |
ec2853a7 | 398 | in the directory <filename>/var/lib/apt/lists</filename>, or in the file named |
24f6490f | 399 | by the variable <literal>Dir::State::Lists</literal> in the <filename>apt.conf</filename> file. |
ec2853a7 AL |
400 | For example, the file |
401 | <filename>debian.lcs.mit.edu_debian_dists_unstable_contrib_binary-i386_Release</filename> | |
402 | contains the <filename>Release</filename> file retrieved from the site | |
24f6490f AL |
403 | <literal>debian.lcs.mit.edu</literal> for <literal>binary-i386</literal> architecture |
404 | files from the <literal>contrib</literal> component of the <literal>unstable</literal> | |
405 | distribution.</para> | |
406 | </refsect2> | |
ec2853a7 | 407 | |
24f6490f AL |
408 | <refsect2> |
409 | <title>Optional Lines in an APT Preferences Record</title> | |
ec2853a7 | 410 | |
24f6490f AL |
411 | <para>Each record in the APT preferences file can optionally begin with |
412 | one or more lines beginning with the word <literal>Explanation:</literal>. | |
413 | This provides a place for comments.</para> | |
ec2853a7 | 414 | |
24f6490f | 415 | <para>The <literal>Pin-Priority:</literal> line in each APT preferences record is |
ec2853a7 | 416 | optional. If omitted, APT assigs a priority of 1 less than the last value |
24f6490f AL |
417 | specified on a line beginning with <literal>Pin-Priority: release ...</literal>.</para> |
418 | </refsect2> | |
419 | </refsect1> | |
ec2853a7 | 420 | |
24f6490f AL |
421 | <refsect1> |
422 | <title>Examples</title> | |
423 | <refsect2> | |
424 | <title>Tracking Stable</title> | |
ec2853a7 | 425 | |
24f6490f | 426 | <para>The following APT preferences file will cause APT to assign a |
ec2853a7 | 427 | priority higher than the default (500) to all package versions belonging |
24f6490f AL |
428 | to a <literal>stable</literal> distribution and a prohibitively low priority to |
429 | package versions belonging to other <literal>Debian</literal> distributions. | |
ec2853a7 AL |
430 | |
431 | <programlisting> | |
5b9d504e AL |
432 | Explanation: Uninstall or do not install any Debian-originated |
433 | Explanation: package versions other than those in the stable distro | |
ec2853a7 AL |
434 | Package: * |
435 | Pin: release a=stable | |
436 | Pin-Priority: 900 | |
437 | ||
ec2853a7 AL |
438 | Package: * |
439 | Pin: release o=Debian | |
440 | Pin-Priority: -10 | |
441 | </programlisting> | |
442 | </para> | |
443 | ||
24f6490f | 444 | <para>With a suitable &sources-list; file and the above preferences file, |
ec2853a7 | 445 | any of the following commands will cause APT to upgrade to the |
24f6490f | 446 | latest <literal>stable</literal> version(s). |
ec2853a7 AL |
447 | |
448 | <programlisting> | |
449 | apt-get install <replaceable>package-name</replaceable> | |
450 | apt-get upgrade | |
451 | apt-get dist-upgrade | |
452 | </programlisting> | |
453 | </para> | |
454 | ||
24f6490f AL |
455 | <para>The following command will cause APT to upgrade the specified |
456 | package to the latest version from the <literal>testing</literal> distribution; | |
5b9d504e AL |
457 | the package will not be upgraded again unless this command is given |
458 | again. | |
ec2853a7 AL |
459 | |
460 | <programlisting> | |
461 | apt-get install <replaceable>package</replaceable>/testing | |
462 | </programlisting> | |
24f6490f AL |
463 | </para> |
464 | </refsect2> | |
ec2853a7 | 465 | |
24f6490f AL |
466 | <refsect2> |
467 | <title>Tracking Testing or Unstable</title> | |
ec2853a7 | 468 | |
24f6490f AL |
469 | <para>The following APT preferences file will cause APT to assign |
470 | a high priority to package versions from the <literal>testing</literal> | |
5b9d504e | 471 | distribution, a lower priority to package versions from the |
24f6490f AL |
472 | <literal>unstable</literal> distribution, and a prohibitively low priority |
473 | to package versions from other <literal>Debian</literal> distributions. | |
ec2853a7 AL |
474 | |
475 | <programlisting> | |
476 | Package: * | |
477 | Pin: release a=testing | |
478 | Pin-Priority: 900 | |
479 | ||
480 | Package: * | |
481 | Pin: release a=unstable | |
482 | Pin-Priority: 800 | |
483 | ||
484 | Package: * | |
485 | Pin: release o=Debian | |
486 | Pin-Priority: -10 | |
487 | </programlisting> | |
488 | </para> | |
489 | ||
24f6490f | 490 | <para>With a suitable &sources-list; file and the above preferences file, |
5b9d504e | 491 | any of the following commands will cause APT to upgrade to the latest |
24f6490f | 492 | <literal>testing</literal> version(s). |
ec2853a7 AL |
493 | |
494 | <programlisting> | |
495 | apt-get install <replaceable>package-name</replaceable> | |
496 | apt-get upgrade | |
497 | apt-get dist-upgrade | |
498 | </programlisting> | |
499 | </para> | |
500 | ||
501 | <para>The following command will cause APT to upgrade the specified | |
24f6490f | 502 | package to the latest version from the <literal>unstable</literal> distribution. |
5b9d504e | 503 | Thereafter, <command>apt-get upgrade</command> will upgrade |
24f6490f | 504 | the package to the most recent <literal>testing</literal> version if that is |
5b9d504e | 505 | more recent than the installed version, otherwise, to the most recent |
24f6490f | 506 | <literal>unstable</literal> version if that is more recent than the installed |
5b9d504e | 507 | version. |
ec2853a7 AL |
508 | |
509 | <programlisting> | |
510 | apt-get install <replaceable>package</replaceable>/unstable | |
511 | </programlisting> | |
512 | </para> | |
513 | ||
24f6490f AL |
514 | </refsect2> |
515 | </refsect1> | |
ec2853a7 | 516 | |
24f6490f AL |
517 | <refsect1> |
518 | <title>See Also</title> | |
ec2853a7 AL |
519 | <para> |
520 | &apt-get; &apt-cache; &apt-conf; &sources-list; | |
5b9d504e | 521 | </para> |
24f6490f | 522 | </refsect1> |
b2e465d6 AL |
523 | |
524 | &manbugs; | |
525 | &manauthor; | |
ec2853a7 | 526 | |
b2e465d6 | 527 | </refentry> |
24f6490f | 528 |