~jr/ubuntu/oneiric/apt/bzr-get-rename

« back to all changes in this revision

Viewing changes to doc/apt_preferences.5

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2005-03-07 20:08:33 UTC
  • Revision ID: james.westby@ubuntu.com-20050307200833-0lxdgg2cb4oculdv
Tags: 0.6.35
* Merge apt--mvo--0 (incorporates 0.6.34ubuntu1):
  - Implement MaxSize and MaxAge in apt.cron.daily, to prevent the cache
    from growing too large (Ubuntu #6761)
  - some comments about the pkgAcqMetaSig::Custom600Headers() added
  - use gpg --with-colons
  - commented the ftp no_proxy unseting in methods/ftp.cc
  - added support for "Acquire::gpgv::options" in methods/gpgv.cc
* Merge bubulle@debian.org--2005/apt--main--0
  - Make capitalization more consistent
  - Un-fuzzy translations resulting from capitalization changes
  - Italian translation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" This manpage has been automatically generated by docbook2man-spec
2
 
.\" from a DocBook document.  docbook2man-spec can be found at:
3
 
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
4
 
.\" Please send any bug reports, improvements, comments, patches, 
5
 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
6
 
.TH "APT_PREFERENCES" "5" "12 March 2001" "" ""
 
1
.\"Generated by db2man.xsl. Don't modify this, modify the source.
 
2
.de Sh \" Subsection
 
3
.br
 
4
.if t .Sp
 
5
.ne 5
 
6
.PP
 
7
\fB\\$1\fR
 
8
.PP
 
9
..
 
10
.de Sp \" Vertical space (when we can't use .PP)
 
11
.if t .sp .5v
 
12
.if n .sp
 
13
..
 
14
.de Ip \" List item
 
15
.br
 
16
.ie \\n(.$>=3 .ne \\$3
 
17
.el .ne 3
 
18
.IP "\\$1" \\$2
 
19
..
 
20
.TH "APT_PREFERENCES" 5 "29 February 2004" "Linux" ""
7
21
.SH NAME
8
22
apt_preferences \- Preference control file for APT
9
23
.SH "DESCRIPTION"
10
 
.PP
11
 
The APT preferences file controls various aspects of the APT system. 
12
 
It is meant to be user editable and manipulatable from software. The file
13
 
consists of a number of records formed like the dpkg status file, space
14
 
seperated sections of text with at the start of each line tags seperated 
15
 
by a colon. It is stored in \fI/etc/apt/preferences\fR.
16
 
.SH "VERSIONING"
17
 
.PP
18
 
One purpose of the preferences file is to let the user select which version
19
 
of a package will be installed. This selection can be made in a number of
20
 
ways that fall into three categories, version, release and origin. 
21
 
.PP
22
 
Selection by version can be done by exact match or prefix match. The format
23
 
is 2.1.2 or 2.2* for a prefix match. Matching by prefix 
24
 
can be used to ignore the r in the Debian release versioning, like
25
 
2.1r* or to ignore Debian specific revisions, 1.1-*.
26
 
When matching versions with a prefix the highest matching version will
27
 
always be picked.
28
 
.PP
29
 
Selection by release is more complicated and has three forms. The primary
30
 
purpose of release selections is to identify a set of packages that match
31
 
a specific vendor, or release (ie Debian 2.1). The first two forms are 
32
 
shortcuts intended for quick command line use. If the first character of the
33
 
specification is a digit then it is considered to be a release version match, 
34
 
otherwise a release label match. Specifications which contain equals are
35
 
full release data matches and are a comma seperated list of one letter keys
36
 
followed by an equals then by the string. Examples:
37
 
.PP
38
 
.sp
39
 
.nf
40
 
v=2.1*,o=Debian,c=main
41
 
l=Debian
42
 
a=stable
43
 
.sp
44
 
.fi
45
 
.PP
46
 
The data for these matches are taken from the \fIRelease\fR files
47
 
that APT downloads during an update. The available keys are:
48
 
.TP
49
 
\fBa= Archive\fR
50
 
This is the common name we give our archives, such as stable or
51
 
unstable. The special name now is used to designate
52
 
the set of packages that are currently installed.
53
 
.TP
54
 
\fBc= Component\fR
55
 
Referes to the sub-component of the archive, main, 
56
 
contrib etc. Component may be omitted if there are no 
57
 
components for this archive.
58
 
.TP
59
 
\fBv= Version\fR
60
 
This is a version string with the same properties as in the Packages file.
61
 
It represents the release level of the archive. Typical Debian release
62
 
numbers look like 2.1r2 with the r designating the release of 
63
 
2.1. New releases are limited to security updates and other important
64
 
changes.
65
 
.TP
66
 
\fBo= Origin\fR
67
 
This specifies who is providing this archive. In the case of Debian the
68
 
string will read Debian. Other providers may use their own 
69
 
string.
70
 
.TP
71
 
\fB\fR
72
 
.TP
73
 
\fBl= Label\fR
74
 
This carries the encompassing name of the distribution. For Debian proper
75
 
this field reads Debian. For derived distributions it should 
76
 
contain their proper name.
77
 
.PP
78
 
.PP
79
 
The final selection method is by origin. This is simply the site name
80
 
of the originating package files. The empty string is used for file URIs.
81
 
.PP
82
 
Version selection, particularly the latter two methods, are used in many
83
 
different parts of APT, not just the preferences file.
84
 
.SH "CANDIDATE VERSION POLICY"
85
 
.PP
86
 
Internally APT maintains a list of all available versions for all packages.
87
 
If you place multiple releases or vendors in your \fB\fIsources.list\fB\fR(5) file then
88
 
these features are available. By default APT selects the highest version
89
 
from all automatic sources. Some sources, such as 
90
 
\fIproject/experimental\fR are marked Not Automatic - these fall 
91
 
to the bottom of the selection pile.
92
 
.PP
93
 
When deciding what version to use APT assigns a priority to each available
94
 
version of the package. It then does two things, first it selects
95
 
the highest priorty version that is newer than the installed version of the 
96
 
package, then it selects the highest priority version that is older than
97
 
the installed version. Next, if the older versions have a priority greater
98
 
than 1000 they are compared with the priority of the upgrade set, the larger
99
 
becomes the selected result. Otherwise the downgrade versions are ignored
100
 
and the highest priority of the ugprade set is selected.
101
 
.PP
102
 
It is possible to think of the priorities in strata:
103
 
.TP
104
 
\fB1000 and up\fR
105
 
Downgradable priorities
106
 
.TP
107
 
\fB1000\fR
108
 
The downgrade prevention barrier
109
 
.TP
110
 
\fB100 to 1000\fR
111
 
Standard priorities. 990 is the priority set by the 
112
 
\fB--target-release \fR \fBapt-get\fR(8) option. 989 is the start for auto
113
 
priorities and 500 are all the default package files.
114
 
.TP
115
 
\fB100\fR
116
 
The currently installed version
117
 
.TP
118
 
\fB0 to 100\fR
119
 
Non automatic priorities. These are only used if the package
120
 
is not installed and there is no other version available.
121
 
.TP
122
 
\fBless than 0\fR
123
 
The version is never selected.
124
 
.PP
125
 
.PP
126
 
Giving a pin a priority greater than 1000 will allow APT to downgrade
127
 
in order to get to that version. 
128
 
.PP
129
 
Each package may be pinned to a specific version and each Packages file
130
 
has a priority for every package inside. The highest priority assigned
131
 
to a package is the one that is used.
132
 
.PP
133
 
A package pin looks like this:
134
 
.PP
135
 
.sp
136
 
.nf
137
 
Package: apt
138
 
Pin: version 0.4.0
139
 
Pin-Priority: 1001
140
 
.sp
141
 
.fi
142
 
The first line specifies the package, the second gives the Pin specification
143
 
and the last gives the priority of this pin. The first word of the pin
144
 
specification may be version, release or origin, the remainder of the field
145
 
is described in the Versioning section above.
146
 
.PP
147
 
A default pin is how the priorities of package files are set. Any number
148
 
of default pins may be specified, the first matching default will select
149
 
the priority of the package file. Only release or origin may be used in 
150
 
the Pin specification since they match Packages files.
151
 
.PP
152
 
.sp
153
 
.nf
154
 
Package: *
155
 
Pin: release v=2.1*
156
 
Pin-Priority: 998
157
 
.sp
158
 
.fi
159
 
.PP
160
 
If the Pin-Priority field is omitted then the priority defaults to 989 for
161
 
both cases.
162
 
.SS "INTERESTING EFFECTS"
163
 
.PP
164
 
Due to the downgrade prevention barrier at priority 1000 it is possible
165
 
that a lower priority version will be selected if the higher priority 
166
 
would cause a downgrade. For instance, if package foo has versions
167
 
1.2, 1.1 and 1.0 installed, with 
168
 
1.1 being the currently installed version and the priorities of 
169
 
each version being 900, 100 and 950 repectively the winning version will be 
170
 
1.2.
171
 
.PP
172
 
In practice this is often desired. A user may use a default pin to
173
 
make the stable distribution the default and then use the 
174
 
\fB--target-dist\fR option with \fBapt-get\fR(8) to select newer versions
175
 
from unstable. The packages that have been upgraded to unstable will
176
 
continue to follow the versions that are available in unstable since
177
 
the stable versions now fall below the downgrade prevention barrier.
178
 
.PP
179
 
If this is not desired then a default pin should be used to make unstable
180
 
have a priority less than 100.
181
 
.PP
182
 
Users of 3rd party add ons such as Helix GNOME can use this mechanism to
183
 
force the usage of Helix packages, or force the usage of Debian packages
184
 
by setting the priority of that source sufficiently high. It is even
185
 
possible to mass downgrade from one set of packages to another by
186
 
using a priority larger than 1000.
 
24
 
 
25
.PP
 
26
The APT preferences file \fI/etc/apt/preferences\fR can be used to control which versions of packages will be selected for installation\&.
 
27
 
 
28
.PP
 
29
Several versions of a package may be available for installation when the \fB\fIsources\&.list\fR\fR(5) file contains references to more than one distribution (for example, stable and testing)\&. APT assigns a priority to each version that is available\&. Subject to dependency constraints, \fBapt\-get\fR selects the version with the highest priority for installation\&. The APT preferences file overrides the priorities that APT assigns to package versions by default, thus giving the user control over which one is selected for installation\&.
 
30
 
 
31
.PP
 
32
Several instances of the same version of a package may be available when the \fB\fIsources\&.list\fR\fR(5) file contains references to more than one source\&. In this case \fBapt\-get\fR downloads the instance listed earliest in the \fB\fIsources\&.list\fR\fR(5) file\&. The APT preferences file does not affect the choice of instance, only the choice of version\&.
 
33
 
 
34
.SS "APT's Default Priority Assignments"
 
35
 
 
36
.PP
 
37
If there is no preferences file or if there is no entry in the file that applies to a particular version then the priority assigned to that version is the priority of the distribution to which that version belongs\&. It is possible to single out a distribution, "the target release", which receives a higher priority than other distributions do by default\&. The target release can be set on the \fBapt\-get\fR command line or in the APT configuration file \fI/etc/apt/apt\&.conf\fR\&. For example, 
 
38
 
 
39
.nf
 
40
 
 
41
\fBapt\-get install \-t testing \fIsome\-package\fR\fR
 
42
 
 
43
.fi
 
44
  
 
45
 
 
46
.nf
 
47
 
 
48
APT::Default\-Release "stable";
 
49
 
 
50
.fi
 
51
 
 
52
 
 
53
.PP
 
54
If the target release has been specified then APT uses the following algorithm to set the priorities of the versions of a package\&. Assign: 
 
55
 
 
56
.TP
 
57
priority 100
 
58
to the version that is already installed (if any)\&.
 
59
 
 
60
.TP
 
61
priority 500
 
62
to the versions that are not installed and do not belong to the target release\&.
 
63
 
 
64
.TP
 
65
priority 990
 
66
to the versions that are not installed and belong to the target release\&.
 
67
 
 
68
 
 
69
.PP
 
70
If the target release has not been specified then APT simply assigns priority 100 to all installed package versions and priority 500 to all uninstalled package versions\&.
 
71
 
 
72
.PP
 
73
APT then applies the following rules, listed in order of precedence, to determine which version of a package to install\&. 
 
74
 
 
75
.TP 3
 
76
\(bu
 
77
Never downgrade unless the priority of an available version exceeds 1000\&. ("Downgrading" is installing a less recent version of a package in place of a more recent version\&. Note that none of APT's default priorities exceeds 1000; such high priorities can only be set in the preferences file\&. Note also that downgrading a package can be risky\&.)
 
78
.TP
 
79
\(bu
 
80
Install the highest priority version\&.
 
81
.TP
 
82
\(bu
 
83
If two or more versions have the same priority, install the most recent one (that is, the one with the higher version number)\&.
 
84
.TP
 
85
\(bu
 
86
If two or more versions have the same priority and version number but either the packages differ in some of their metadata or the \-\-reinstall option is given, install the uninstalled one\&.
 
87
.LP
 
88
 
 
89
 
 
90
.PP
 
91
In a typical situation, the installed version of a package (priority 100) is not as recent as one of the versions available from the sources listed in the \fB\fIsources\&.list\fR\fR(5) file (priority 500 or 990)\&. Then the package will be upgraded when \fBapt\-get install \fIsome\-package\fR\fR or \fBapt\-get upgrade\fR is executed\&.
 
92
 
 
93
.PP
 
94
More rarely, the installed version of a package is more recent than any of the other available versions\&. The package will not be downgraded when \fBapt\-get install \fIsome\-package\fR\fR or \fBapt\-get upgrade\fR is executed\&.
 
95
 
 
96
.PP
 
97
Sometimes the installed version of a package is more recent than the version belonging to the target release, but not as recent as a version belonging to some other distribution\&. Such a package will indeed be upgraded when \fBapt\-get install \fIsome\-package\fR\fR or \fBapt\-get upgrade\fR is executed, because at least one of the available versions has a higher priority than the installed version\&.
 
98
 
 
99
.SS "The Effect of APT Preferences"
 
100
 
 
101
.PP
 
102
The APT preferences file allows the system administrator to control the assignment of priorities\&. The file consists of one or more multi\-line records separated by blank lines\&. Records can have one of two forms, a specific form and a general form\&. 
 
103
 
 
104
.TP 3
 
105
\(bu
 
106
The specific form assigns a priority (a "Pin\-Priority") to a specified package and specified version or version range\&. For example, the following record assigns a high priority to all versions of the \fIperl\fR package whose version number begins with "5\&.8"\&.
 
107
 
 
108
.nf
 
109
 
 
110
Package: perl
 
111
Pin: version 5\&.8*
 
112
Pin\-Priority: 1001
 
113
 
 
114
.fi
 
115
.TP
 
116
\(bu
 
117
The general form assigns a priority to all of the package versions in a given distribution (that is, to all the versions of packages that are listed in a certain \fIRelease\fR file) or to all of the package versions coming from a particular Internet site, as identified by the site's fully qualified domain name\&.
 
118
 
 
119
This general\-form entry in the APT preferences file applies only to groups of packages\&. For example, the following record assigns a high priority to all package versions available from the local site\&.
 
120
 
 
121
 
 
122
.nf
 
123
 
 
124
Package: *
 
125
Pin: origin ""
 
126
Pin\-Priority: 999
 
127
 
 
128
.fi
 
129
A note of caution: the keyword used here is "origin"\&. This should not be confused with the Origin of a distribution as specified in a \fIRelease\fR file\&. What follows the "Origin:" tag in a \fIRelease\fR file is not an Internet address but an author or vendor name, such as "Debian" or "Ximian"\&.
 
130
 
 
131
The following record assigns a low priority to all package versions belonging to any distribution whose Archive name is "unstable"\&.
 
132
 
 
133
 
 
134
.nf
 
135
 
 
136
Package: *
 
137
Pin: release a=unstable
 
138
Pin\-Priority: 50
 
139
 
 
140
.fi
 
141
The following record assigns a high priority to all package versions belonging to any release whose Archive name is "stable" and whose release Version number is "3\&.0"\&.
 
142
 
 
143
.nf
 
144
 
 
145
Package: *
 
146
Pin: release a=stable, v=3\&.0
 
147
Pin\-Priority: 500
 
148
 
 
149
.fi
 
150
.LP
 
151
 
 
152
 
 
153
.SS "How APT Interprets Priorities"
 
154
 
 
155
.PP
 
156
Priorities (P) assigned in the APT preferences file must be positive or negative integers\&. They are interpreted as follows (roughly speaking): 
 
157
 
 
158
.TP
 
159
P > 1000
 
160
causes a version to be installed even if this constitutes a downgrade of the package
 
161
 
 
162
.TP
 
163
990 < P <=1000
 
164
causes a version to be installed even if it does not come from the target release, unless the installed version is more recent
 
165
 
 
166
.TP
 
167
500 < P <=990
 
168
causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent
 
169
 
 
170
.TP
 
171
100 < P <=500
 
172
causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent
 
173
 
 
174
.TP
 
175
0 < P <=100
 
176
causes a version to be installed only if there is no installed version of the package
 
177
 
 
178
.TP
 
179
P < 0
 
180
prevents the version from being installed
 
181
 
 
182
 
 
183
.PP
 
184
If any specific\-form records match an available package version then the first such record determines the priority of the package version\&. Failing that, if any general\-form records match an available package version then the first such record determines the priority of the package version\&.
 
185
 
 
186
.PP
 
187
For example, suppose the APT preferences file contains the three records presented earlier:
 
188
 
 
189
.nf
 
190
 
 
191
Package: perl
 
192
Pin: version 5\&.8*
 
193
Pin\-Priority: 1001
 
194
 
 
195
Package: *
 
196
Pin: origin ""
 
197
Pin\-Priority: 999
 
198
 
 
199
Package: *
 
200
Pin: release unstable
 
201
Pin\-Priority: 50
 
202
 
 
203
.fi
 
204
 
 
205
.PP
 
206
Then: 
 
207
 
 
208
.TP 3
 
209
\(bu
 
210
The most recent available version of the perl package will be installed, so long as that version's version number begins with "5\&.8"\&. If any 5\&.8* version of perl is available and the installed version is 5\&.9*, then perl will be downgraded\&.
 
211
.TP
 
212
\(bu
 
213
A version of any package other than perl that is available from the local system has priority over other versions, even versions belonging to the target release\&.
 
214
.TP
 
215
\(bu
 
216
A version of a package whose origin is not the local system but some other site listed in \fB\fIsources\&.list\fR\fR(5) and which belongs to an unstable distribution is only installed if it is selected for installation and no version of the package is already installed\&.
 
217
.LP
 
218
 
 
219
 
 
220
.SS "Determination of Package Version and Distribution Properties"
 
221
 
 
222
.PP
 
223
The locations listed in the \fB\fIsources\&.list\fR\fR(5) file should provide \fIPackages\fR and \fIRelease\fR files to describe the packages available at that location\&.
 
224
 
 
225
.PP
 
226
The \fIPackages\fR file is normally found in the directory \fI\&.\&.\&./dists/\fIdist\-name\fR/\fIcomponent\fR/\fIarch\fR\fR: for example, \fI\&.\&.\&./dists/stable/main/binary\-i386/Packages\fR\&. It consists of a series of multi\-line records, one for each package available in that directory\&. Only two lines in each record are relevant for setting APT priorities: 
 
227
 
 
228
.TP
 
229
the Package: line
 
230
gives the package name
 
231
 
 
232
.TP
 
233
the Version: line
 
234
gives the version number for the named package
 
235
 
 
236
 
 
237
.PP
 
238
The \fIRelease\fR file is normally found in the directory \fI\&.\&.\&./dists/\fIdist\-name\fR\fR: for example, \fI\&.\&.\&./dists/stable/Release\fR, or \fI\&.\&.\&./dists/woody/Release\fR\&. It consists of a single multi\-line record which applies to all of the packages in the directory tree below its parent\&. Unlike the \fIPackages\fR file, nearly all of the lines in a \fIRelease\fR file are relevant for setting APT priorities: 
 
239
 
 
240
.TP
 
241
the Archive: line
 
242
names the archive to which all the packages in the directory tree belong\&. For example, the line "Archive: stable" specifies that all of the packages in the directory tree below the parent of the \fIRelease\fR file are in a stable archive\&. Specifying this value in the APT preferences file would require the line:
 
243
 
 
244
.nf
 
245
 
 
246
Pin: release a=stable
 
247
 
 
248
.fi
 
249
 
 
250
.TP
 
251
the Version: line
 
252
names the release version\&. For example, the packages in the tree might belong to Debian GNU/Linux release version 3\&.0\&. Note that there is normally no version number for the testing and unstable distributions because they have not been released yet\&. Specifying this in the APT preferences file would require one of the following lines\&.
 
253
 
 
254
.nf
 
255
 
 
256
Pin: release v=3\&.0
 
257
Pin: release a=stable, v=3\&.0
 
258
Pin: release 3\&.0
 
259
 
 
260
.fi
 
261
 
 
262
.TP
 
263
the Component: line
 
264
names the licensing component associated with the packages in the directory tree of the \fIRelease\fR file\&. For example, the line "Component: main" specifies that all the packages in the directory tree are from the main component, which entails that they are licensed under terms listed in the Debian Free Software Guidelines\&. Specifying this component in the APT preferences file would require the line:
 
265
 
 
266
.nf
 
267
 
 
268
Pin: release c=main
 
269
 
 
270
.fi
 
271
 
 
272
.TP
 
273
the Origin: line
 
274
names the originator of the packages in the directory tree of the \fIRelease\fR file\&. Most commonly, this is Debian\&. Specifying this origin in the APT preferences file would require the line:
 
275
 
 
276
.nf
 
277
 
 
278
Pin: release o=Debian
 
279
 
 
280
.fi
 
281
 
 
282
.TP
 
283
the Label: line
 
284
names the label of the packages in the directory tree of the \fIRelease\fR file\&. Most commonly, this is Debian\&. Specifying this label in the APT preferences file would require the line:
 
285
 
 
286
.nf
 
287
 
 
288
Pin: release l=Debian
 
289
 
 
290
.fi
 
291
 
 
292
 
 
293
.PP
 
294
All of the \fIPackages\fR and \fIRelease\fR files retrieved from locations listed in the \fB\fIsources\&.list\fR\fR(5) file are stored in the directory \fI/var/lib/apt/lists\fR, or in the file named by the variable Dir::State::Lists in the \fIapt\&.conf\fR file\&. For example, the file \fIdebian\&.lcs\&.mit\&.edu_debian_dists_unstable_contrib_binary\-i386_Release\fR contains the \fIRelease\fR file retrieved from the site debian\&.lcs\&.mit\&.edu for binary\-i386 architecture files from the contrib component of the unstable distribution\&.
 
295
 
 
296
.SS "Optional Lines in an APT Preferences Record"
 
297
 
 
298
.PP
 
299
Each record in the APT preferences file can optionally begin with one or more lines beginning with the word Explanation:\&. This provides a place for comments\&.
 
300
 
 
301
.PP
 
302
The Pin\-Priority: line in each APT preferences record is optional\&. If omitted, APT assigs a priority of 1 less than the last value specified on a line beginning with Pin\-Priority: release \&.\&.\&.\&.
 
303
 
 
304
.SH "EXAMPLES"
 
305
 
 
306
.SS "Tracking Stable"
 
307
 
 
308
.PP
 
309
The following APT preferences file will cause APT to assign a priority higher than the default (500) to all package versions belonging to a stable distribution and a prohibitively low priority to package versions belonging to other Debian distributions\&. 
 
310
 
 
311
.nf
 
312
 
 
313
Explanation: Uninstall or do not install any Debian\-originated
 
314
Explanation: package versions other than those in the stable distro
 
315
Package: *
 
316
Pin: release a=stable
 
317
Pin\-Priority: 900
 
318
 
 
319
Package: *
 
320
Pin: release o=Debian
 
321
Pin\-Priority: \-10
 
322
 
 
323
.fi
 
324
 
 
325
 
 
326
.PP
 
327
With a suitable \fB\fIsources\&.list\fR\fR(5) file and the above preferences file, any of the following commands will cause APT to upgrade to the latest stable version(s)\&. 
 
328
 
 
329
.nf
 
330
 
 
331
apt\-get install \fIpackage\-name\fR
 
332
apt\-get upgrade
 
333
apt\-get dist\-upgrade
 
334
 
 
335
.fi
 
336
 
 
337
 
 
338
.PP
 
339
The following command will cause APT to upgrade the specified package to the latest version from the testing distribution; the package will not be upgraded again unless this command is given again\&. 
 
340
 
 
341
.nf
 
342
 
 
343
apt\-get install \fIpackage\fR/testing
 
344
 
 
345
.fi
 
346
 
 
347
 
 
348
.SS "Tracking Testing or Unstable"
 
349
 
 
350
.PP
 
351
The following APT preferences file will cause APT to assign a high priority to package versions from the testing distribution, a lower priority to package versions from the unstable distribution, and a prohibitively low priority to package versions from other Debian distributions\&. 
 
352
 
 
353
.nf
 
354
 
 
355
Package: *
 
356
Pin: release a=testing
 
357
Pin\-Priority: 900
 
358
 
 
359
Package: *
 
360
Pin: release a=unstable
 
361
Pin\-Priority: 800
 
362
 
 
363
Package: *
 
364
Pin: release o=Debian
 
365
Pin\-Priority: \-10
 
366
 
 
367
.fi
 
368
 
 
369
 
 
370
.PP
 
371
With a suitable \fB\fIsources\&.list\fR\fR(5) file and the above preferences file, any of the following commands will cause APT to upgrade to the latest testing version(s)\&. 
 
372
 
 
373
.nf
 
374
 
 
375
apt\-get install \fIpackage\-name\fR
 
376
apt\-get upgrade
 
377
apt\-get dist\-upgrade
 
378
 
 
379
.fi
 
380
 
 
381
 
 
382
.PP
 
383
The following command will cause APT to upgrade the specified package to the latest version from the unstable distribution\&. Thereafter, \fBapt\-get upgrade\fR will upgrade the package to the most recent testing version if that is more recent than the installed version, otherwise, to the most recent unstable version if that is more recent than the installed version\&. 
 
384
 
 
385
.nf
 
386
 
 
387
apt\-get install \fIpackage\fR/unstable
 
388
 
 
389
.fi
 
390
 
 
391
 
187
392
.SH "SEE ALSO"
 
393
 
188
394
.PP
189
 
\fBapt-cache\fR(8) \fB\fIapt.conf\fB\fR(5)
 
395
\fB\fBapt\-get\fR\fR(8)  \fB\fBapt\-cache\fR\fR(8)  \fB\fIapt\&.conf\fR\fR(5)  \fB\fIsources\&.list\fR\fR(5) 
 
396
 
190
397
.SH "BUGS"
191
 
.PP
192
 
See the APT bug page <URL:http://bugs.debian.org/apt>. 
193
 
If you wish to report a bug in APT, please see 
194
 
\fI/usr/share/doc/debian/bug-reporting.txt\fR or the \fBbug\fR(1) command.
195
 
.SH "AUTHOR"
196
 
.PP
197
 
APT was written by the APT team <apt@packages.debian.org>.
 
398
 
 
399
.PP
 
400
APT bug page: \fIhttp://bugs.debian.org/src:apt\fR\&. If you wish to report a bug in APT, please see \fI/usr/share/doc/debian/bug\-reporting\&.txt\fR or the \fB\fBreportbug\fR\fR(1) command\&.
 
401
 
 
402
.SH AUTHOR
 
403
APT team.