apt_preferences.5.xml 24 KB

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