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