apt_preferences.5.xml 23 KB

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