apt_preferences.5.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  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. This should not be confused with the Origin of a distribution as
  170. specified in a <filename>Release</filename> file. What follows the "Origin:" tag
  171. in a <filename>Release</filename> file is not an Internet address
  172. but an author or vendor name, such as "Debian" or "Ximian".</simpara>
  173. <simpara>The following record assigns a low priority to all package versions
  174. belonging to any distribution whose Archive name is "<literal>unstable</literal>".</simpara>
  175. <programlisting>
  176. Package: *
  177. Pin: release a=unstable
  178. Pin-Priority: 50
  179. </programlisting>
  180. <simpara>The following record assigns a high priority to all package versions
  181. belonging to any distribution whose Codename is "<literal>squeeze</literal>".</simpara>
  182. <programlisting>
  183. Package: *
  184. Pin: release n=squeeze
  185. Pin-Priority: 900
  186. </programlisting>
  187. <simpara>The following record assigns a high priority to all package versions
  188. belonging to any release whose Archive name is "<literal>stable</literal>"
  189. and whose release Version number is "<literal>3.0</literal>".</simpara>
  190. <programlisting>
  191. Package: *
  192. Pin: release a=stable, v=3.0
  193. Pin-Priority: 500
  194. </programlisting>
  195. </listitem>
  196. </itemizedlist>
  197. </para>
  198. </refsect2>
  199. <refsect2>
  200. <title>How APT Interprets Priorities</title>
  201. <para>
  202. Priorities (P) assigned in the APT preferences file must be positive
  203. or negative integers. They are interpreted as follows (roughly speaking):
  204. <variablelist>
  205. <varlistentry>
  206. <term>P &gt; 1000</term>
  207. <listitem><simpara>causes a version to be installed even if this
  208. constitutes a downgrade of the package</simpara></listitem>
  209. </varlistentry>
  210. <varlistentry>
  211. <term>990 &lt; P &lt;=1000</term>
  212. <listitem><simpara>causes a version to be installed
  213. even if it does not come from the target release,
  214. unless the installed version is more recent</simpara></listitem>
  215. </varlistentry>
  216. <varlistentry>
  217. <term>500 &lt; P &lt;=990</term>
  218. <listitem><simpara>causes a version to be installed
  219. unless there is a version available belonging to the target release
  220. or the installed version is more recent</simpara></listitem>
  221. </varlistentry>
  222. <varlistentry>
  223. <term>100 &lt; P &lt;=500</term>
  224. <listitem><simpara>causes a version to be installed
  225. unless there is a version available belonging to some other
  226. distribution or the installed version is more recent</simpara></listitem>
  227. </varlistentry>
  228. <varlistentry>
  229. <term>0 &lt; P &lt;=100</term>
  230. <listitem><simpara>causes a version to be installed
  231. only if there is no installed version of the package</simpara></listitem>
  232. </varlistentry>
  233. <varlistentry>
  234. <term>P &lt; 0</term>
  235. <listitem><simpara>prevents the version from being installed</simpara></listitem>
  236. </varlistentry>
  237. </variablelist>
  238. </para>
  239. <para>If any specific-form records match an available package version then the
  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
  243. first such record determines the priority of the package version.</para>
  244. <para>For example, suppose the APT preferences file contains the three
  245. records presented earlier:</para>
  246. <programlisting>
  247. Package: perl
  248. Pin: version 5.8*
  249. Pin-Priority: 1001
  250. Package: *
  251. Pin: origin ""
  252. Pin-Priority: 999
  253. Package: *
  254. Pin: release unstable
  255. Pin-Priority: 50
  256. </programlisting>
  257. <para>Then:
  258. <itemizedlist>
  259. <listitem><simpara>The most recent available version of the <literal>perl</literal>
  260. package will be installed, so long as that version's version number begins
  261. with "<literal>5.8</literal>". If <emphasis>any</emphasis> 5.8* version of <literal>perl</literal> is
  262. available and the installed version is 5.9*, then <literal>perl</literal> will be
  263. downgraded.</simpara></listitem>
  264. <listitem><simpara>A version of any package other than <literal>perl</literal>
  265. that is available from the local system has priority over other versions,
  266. even versions belonging to the target release.
  267. </simpara></listitem>
  268. <listitem><simpara>A version of a package whose origin is not the local
  269. system but some other site listed in &sources-list; and which belongs to
  270. an <literal>unstable</literal> distribution is only installed if it is selected
  271. for installation and no version of the package is already installed.
  272. </simpara></listitem>
  273. </itemizedlist>
  274. </para>
  275. </refsect2>
  276. <refsect2>
  277. <title>Determination of Package Version and Distribution Properties</title>
  278. <para>The locations listed in the &sources-list; file should provide
  279. <filename>Packages</filename> and <filename>Release</filename> files
  280. to describe the packages available at that location. </para>
  281. <para>The <filename>Packages</filename> file is normally found in the directory
  282. <filename>.../dists/<replaceable>dist-name</replaceable>/<replaceable>component</replaceable>/<replaceable>arch</replaceable></filename>:
  283. for example, <filename>.../dists/stable/main/binary-i386/Packages</filename>.
  284. It consists of a series of multi-line records, one for each package available
  285. in that directory. Only two lines in each record are relevant for setting
  286. APT priorities:
  287. <variablelist>
  288. <varlistentry>
  289. <term>the <literal>Package:</literal> line</term>
  290. <listitem><simpara>gives the package name</simpara></listitem>
  291. </varlistentry>
  292. <varlistentry>
  293. <term>the <literal>Version:</literal> line</term>
  294. <listitem><simpara>gives the version number for the named package</simpara></listitem>
  295. </varlistentry>
  296. </variablelist>
  297. </para>
  298. <para>The <filename>Release</filename> file is normally found in the directory
  299. <filename>.../dists/<replaceable>dist-name</replaceable></filename>:
  300. for example, <filename>.../dists/stable/Release</filename>,
  301. or <filename>.../dists/woody/Release</filename>.
  302. It consists of a single multi-line record which applies to <emphasis>all</emphasis> of
  303. the packages in the directory tree below its parent. Unlike the
  304. <filename>Packages</filename> file, nearly all of the lines in a <filename>Release</filename>
  305. file are relevant for setting APT priorities:
  306. <variablelist>
  307. <varlistentry>
  308. <term>the <literal>Archive:</literal> or <literal>Suite:</literal> line</term>
  309. <listitem><simpara>names the archive to which all the packages
  310. in the directory tree belong. For example, the line
  311. "Archive: stable" or
  312. "Suite: stable"
  313. specifies that all of the packages in the directory
  314. tree below the parent of the <filename>Release</filename> file are in a
  315. <literal>stable</literal> archive. Specifying this value in the APT preferences file
  316. would require the line:
  317. </simpara>
  318. <programlisting>
  319. Pin: release a=stable
  320. </programlisting>
  321. </listitem>
  322. </varlistentry>
  323. <varlistentry>
  324. <term>the <literal>Codename:</literal> line</term>
  325. <listitem><simpara>names the codename to which all the packages
  326. in the directory tree belong. For example, the line
  327. "Codename: squeeze"
  328. specifies that all of the packages in the directory
  329. tree below the parent of the <filename>Release</filename> file belong to a version named
  330. <literal>squeeze</literal>. Specifying this value in the APT preferences file
  331. would require the line:
  332. </simpara>
  333. <programlisting>
  334. Pin: release n=squeeze
  335. </programlisting>
  336. </listitem>
  337. </varlistentry>
  338. <varlistentry>
  339. <term>the <literal>Version:</literal> line</term>
  340. <listitem><simpara>names the release version. For example, the
  341. packages in the tree might belong to Debian GNU/Linux release
  342. version 3.0. Note that there is normally no version number for the
  343. <literal>testing</literal> and <literal>unstable</literal> distributions because they
  344. have not been released yet. Specifying this in the APT preferences
  345. file would require one of the following lines.
  346. </simpara>
  347. <programlisting>
  348. Pin: release v=3.0
  349. Pin: release a=stable, v=3.0
  350. Pin: release 3.0
  351. </programlisting>
  352. </listitem>
  353. </varlistentry>
  354. <varlistentry>
  355. <term>the <literal>Component:</literal> line</term>
  356. <listitem><simpara>names the licensing component associated with the
  357. packages in the directory tree of the <filename>Release</filename> file.
  358. For example, the line "Component: main" specifies that
  359. all the packages in the directory tree are from the <literal>main</literal>
  360. component, which entails that they are licensed under terms listed
  361. in the Debian Free Software Guidelines. Specifying this component
  362. in the APT preferences file would require the line:
  363. </simpara>
  364. <programlisting>
  365. Pin: release c=main
  366. </programlisting>
  367. </listitem>
  368. </varlistentry>
  369. <varlistentry>
  370. <term>the <literal>Origin:</literal> line</term>
  371. <listitem><simpara>names the originator of the packages in the
  372. directory tree of the <filename>Release</filename> file. Most commonly, this is
  373. <literal>Debian</literal>. Specifying this origin in the APT preferences file
  374. would require the line:
  375. </simpara>
  376. <programlisting>
  377. Pin: release o=Debian
  378. </programlisting>
  379. </listitem>
  380. </varlistentry>
  381. <varlistentry>
  382. <term>the <literal>Label:</literal> line</term>
  383. <listitem><simpara>names the label of the packages in the directory tree
  384. of the <filename>Release</filename> file. Most commonly, this is
  385. <literal>Debian</literal>. Specifying this label in the APT preferences file
  386. would require the line:
  387. </simpara>
  388. <programlisting>
  389. Pin: release l=Debian
  390. </programlisting>
  391. </listitem>
  392. </varlistentry>
  393. </variablelist>
  394. </para>
  395. <para>All of the <filename>Packages</filename> and <filename>Release</filename>
  396. files retrieved from locations listed in the &sources-list; file are stored
  397. in the directory <filename>/var/lib/apt/lists</filename>, or in the file named
  398. by the variable <literal>Dir::State::Lists</literal> in the <filename>apt.conf</filename> file.
  399. For example, the file
  400. <filename>debian.lcs.mit.edu_debian_dists_unstable_contrib_binary-i386_Release</filename>
  401. contains the <filename>Release</filename> file retrieved from the site
  402. <literal>debian.lcs.mit.edu</literal> for <literal>binary-i386</literal> architecture
  403. files from the <literal>contrib</literal> component of the <literal>unstable</literal>
  404. distribution.</para>
  405. </refsect2>
  406. <refsect2>
  407. <title>Optional Lines in an APT Preferences Record</title>
  408. <para>Each record in the APT preferences file can optionally begin with
  409. one or more lines beginning with the word <literal>Explanation:</literal>.
  410. This provides a place for comments.</para>
  411. <para>The <literal>Pin-Priority:</literal> line in each APT preferences record is
  412. optional. If omitted, APT assigns a priority of 1 less than the last value
  413. specified on a line beginning with <literal>Pin-Priority: release ...</literal>.</para>
  414. </refsect2>
  415. </refsect1>
  416. <refsect1>
  417. <title>Examples</title>
  418. <refsect2>
  419. <title>Tracking Stable</title>
  420. <para>The following APT preferences file will cause APT to assign a
  421. priority higher than the default (500) to all package versions belonging
  422. to a <literal>stable</literal> distribution and a prohibitively low priority to
  423. package versions belonging to other <literal>Debian</literal> distributions.
  424. <programlisting>
  425. Explanation: Uninstall or do not install any Debian-originated
  426. Explanation: package versions other than those in the stable distro
  427. Package: *
  428. Pin: release a=stable
  429. Pin-Priority: 900
  430. Package: *
  431. Pin: release o=Debian
  432. Pin-Priority: -10
  433. </programlisting>
  434. </para>
  435. <para>With a suitable &sources-list; file and the above preferences file,
  436. any of the following commands will cause APT to upgrade to the
  437. latest <literal>stable</literal> version(s).
  438. <programlisting>
  439. apt-get install <replaceable>package-name</replaceable>
  440. apt-get upgrade
  441. apt-get dist-upgrade
  442. </programlisting>
  443. </para>
  444. <para>The following command will cause APT to upgrade the specified
  445. package to the latest version from the <literal>testing</literal> distribution;
  446. the package will not be upgraded again unless this command is given
  447. again.
  448. <programlisting>
  449. apt-get install <replaceable>package</replaceable>/testing
  450. </programlisting>
  451. </para>
  452. </refsect2>
  453. <refsect2>
  454. <title>Tracking Testing or Unstable</title>
  455. <para>The following APT preferences file will cause APT to assign
  456. a high priority to package versions from the <literal>testing</literal>
  457. distribution, a lower priority to package versions from the
  458. <literal>unstable</literal> distribution, and a prohibitively low priority
  459. to package versions from other <literal>Debian</literal> distributions.
  460. <programlisting>
  461. Package: *
  462. Pin: release a=testing
  463. Pin-Priority: 900
  464. Package: *
  465. Pin: release a=unstable
  466. Pin-Priority: 800
  467. Package: *
  468. Pin: release o=Debian
  469. Pin-Priority: -10
  470. </programlisting>
  471. </para>
  472. <para>With a suitable &sources-list; file and the above preferences file,
  473. any of the following commands will cause APT to upgrade to the latest
  474. <literal>testing</literal> version(s).
  475. <programlisting>
  476. apt-get install <replaceable>package-name</replaceable>
  477. apt-get upgrade
  478. apt-get dist-upgrade
  479. </programlisting>
  480. </para>
  481. <para>The following command will cause APT to upgrade the specified
  482. package to the latest version from the <literal>unstable</literal> distribution.
  483. Thereafter, <command>apt-get upgrade</command> will upgrade
  484. the package to the most recent <literal>testing</literal> version if that is
  485. more recent than the installed version, otherwise, to the most recent
  486. <literal>unstable</literal> version if that is more recent than the installed
  487. version.
  488. <programlisting>
  489. apt-get install <replaceable>package</replaceable>/unstable
  490. </programlisting>
  491. </para>
  492. </refsect2>
  493. <refsect2>
  494. <title>Tracking the evolution of a codename release</title>
  495. <para>The following APT preferences file will cause APT to assign a
  496. priority higher than the default (500) to all package versions belonging
  497. to a specified codename of a distribution and a prohibitively low priority to
  498. package versions belonging to other <literal>Debian</literal> distributions,
  499. codenames and archives.
  500. Note that with this APT preference APT will follow the migration of a release
  501. from the archive <literal>testing</literal> to <literal>stable</literal> and
  502. later <literal>oldstable</literal>. If you want to follow for example the progress
  503. in <literal>testing</literal> notwithstanding the codename changes you should use
  504. the example configurations above.
  505. <programlisting>
  506. Explanation: Uninstall or do not install any Debian-originated package versions
  507. Explanation: other than those in the distribution codenamed with squeeze or sid
  508. Package: *
  509. Pin: release n=squeeze
  510. Pin-Priority: 900
  511. Explanation: Debian unstable is always codenamed with sid
  512. Package: *
  513. Pin: release a=sid
  514. Pin-Priority: 800
  515. Package: *
  516. Pin: release o=Debian
  517. Pin-Priority: -10
  518. </programlisting>
  519. </para>
  520. <para>With a suitable &sources-list; file and the above preferences file,
  521. any of the following commands will cause APT to upgrade to the
  522. latest version(s) in the release codenamed with <literal>squeeze</literal>.
  523. <programlisting>
  524. apt-get install <replaceable>package-name</replaceable>
  525. apt-get upgrade
  526. apt-get dist-upgrade
  527. </programlisting>
  528. </para>
  529. <para>The following command will cause APT to upgrade the specified
  530. package to the latest version from the <literal>sid</literal> distribution.
  531. Thereafter, <command>apt-get upgrade</command> will upgrade
  532. the package to the most recent <literal>squeeze</literal> version if that is
  533. more recent than the installed version, otherwise, to the most recent
  534. <literal>sid</literal> version if that is more recent than the installed
  535. version.
  536. <programlisting>
  537. apt-get install <replaceable>package</replaceable>/sid
  538. </programlisting>
  539. </para>
  540. </refsect2>
  541. </refsect1>
  542. <refsect1>
  543. <title>Files</title>
  544. <variablelist>
  545. &file-preferences;
  546. </variablelist>
  547. </refsect1>
  548. <refsect1>
  549. <title>See Also</title>
  550. <para>&apt-get; &apt-cache; &apt-conf; &sources-list;
  551. </para>
  552. </refsect1>
  553. &manbugs;
  554. </refentry>