summaryrefslogtreecommitdiff
path: root/doc/en/manpage.xml
blob: faf47b1437e2d0ec0d62362726ccad5c2ac0122e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
<refentry>
  <refentryinfo>
    <!--
	The <author> element isn't needed here, because docbook-xsl
	automatically generates author information from the main
	document's author element.  Languages that provide only a
	manpage should include this information, though.

    <author>
      <personname>
	<firstname>Daniel</firstname>
	<surname>Burrows</surname>
      </personname>
      <email>dburrows@debian.org</email>
    </author>
    -->
    <title>aptitude</title>

     <!-- NWalsh's docbook scripts use this to generate the footer: -->
    <productname>aptitude</productname>
    <productnumber>&VERSION;</productnumber>

    <legalnotice>
      <para>
	This manual page is free software; you can redistribute it
	and/or modify it under the terms of the GNU General Public
	License as published by the Free Software Foundation;
	either version 2 of the License, or (at your option) any
	later version.
      </para>

      <para>
	This manual page is distributed in the hope that it will
	be useful, but WITHOUT ANY WARRANTY; without even the
	implied warranty of MERCHANTABILITY or FITNESS FOR A
	PARTICULAR PURPOSE.  See the GNU General Public License
	for more details.
      </para>

      <para>
	You should have received a copy of the GNU General Public
	License along with this program; if not, write to the Free
	Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
	Boston, MA 02110-1301 USA.
      </para>
    </legalnotice>
  </refentryinfo>

  <refmeta>
    <refentrytitle>&aptitude;</refentrytitle>
    <manvolnum>8</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>&aptitude;</refname>
    <refpurpose>high-level interface to the package manager</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>autoclean</arg>
	<arg choice='plain'>clean</arg>
	<arg choice='plain'>forget-new</arg>
	<arg choice='plain'>keep-all</arg>
	<arg choice='plain'>update</arg>
	<arg choice='plain'>safe-upgrade</arg>
      </group>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>changelog</arg>
	<arg choice='plain'>full-upgrade</arg>
	<arg choice='plain'>download</arg>
	<arg choice='plain'>forbid-version</arg>
	<arg choice='plain'>hold</arg>
	<arg choice='plain'>install</arg>
	<arg choice='plain'>keep-all</arg>
	<arg choice='plain'>markauto</arg>
	<arg choice='plain'>purge</arg>
	<arg choice='plain'>reinstall</arg>
	<arg choice='plain'>remove</arg>
	<arg choice='plain'>show</arg>
	<arg choice='plain'>unhold</arg>
	<arg choice='plain'>unmarkauto</arg>
      </group>

      <arg choice='plain' rep='repeat'><replaceable>packages</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <arg choice='plain'>search</arg>

      <arg choice='plain' rep='repeat'><replaceable>patterns</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>

      <arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>

      <group choice='req'>
	<arg choice='plain'>why</arg>
	<arg choice='plain'>why-not</arg>
      </group>

      <arg choice='plain' rep='repeat'><replaceable>patterns</replaceable></arg>

      <arg choice='plain'><replaceable>package</replaceable></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>
      <arg choice='opt'>-S <replaceable>fname</replaceable></arg>
      <group choice='opt'><arg choice='plain'>-u</arg> <arg
      choice='plain'>-i</arg></group>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>aptitude</command>
      <arg choice='plain'>help</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para>
      &aptitude; is a text-based interface to the Debian GNU/Linux
      package system.
    </para>

    <para>
      It allows the user to view the list of packages and to
      perform package management tasks such as installing,
      upgrading, and removing packages.  Actions may be performed
      from a visual interface or from the command-line.
    </para>
  </refsect1>

  <refsect1>
    <title>Command-Line Actions</title>

    <para>
      The first argument which does not begin with a hyphen (<quote><literal>-</literal></quote>)
      is considered to be an action that the program should
      perform.  If an action is not specified on the command-line,
      &aptitude; will start up in visual mode.
    </para>

    <para>
      The following actions are available:
    </para>

    <variablelist>
      <varlistentry id='cmdlineInstall'>
	<term><literal>install</literal></term>

	<listitem>
	  <para>
	    Install one or more packages.  The packages should be
	    listed after the <quote>install</quote> command; if a
	    package name contains a tilde character
	    (<quote><literal>~</literal></quote>), it will be
	    treated as a search pattern and every package matching
	    the pattern will be installed (see the section <link
	    linkend='secSearchPatterns'><quote>Search
	    Patterns</quote></link> in the &aptitude; reference
	    manual).
	  </para>

	  <para>
	    To select a particular version of the package, append <quote><literal>=<replaceable>version</replaceable></literal></quote>
	    to the package name: for instance, <quote><literal>aptitude install
	    apt=0.3.1</literal></quote>.  Similarly, to select a
	    package from a particular archive, append <quote><literal>/<replaceable>archive</replaceable></literal></quote>
	    to the package name: for instance, <quote><literal>aptitude install
	    apt/experimental</literal></quote>.
	  </para>

	  <para id='parOverrideSpecifiers'>
	    Not every package listed on the command line has to be
	    installed; you can tell &aptitude; to do something
	    different with a package by appending an <quote>override
	    specifier</quote> to the name of the package.  For
	    example, <literal>aptitude remove wesnoth+</literal> will
	    install <literal>wesnoth</literal>, not remove it.  The
	    following override specifiers are available:
	  </para>

	  <variablelist>
	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>+</literal></term>
	      <listitem>
		<para>
		  Install <replaceable>package</replaceable>.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>+M</literal></term>
	      <listitem>
		<para>
		  Install <replaceable>package</replaceable> and
		  immediately mark it as <link
		  linkend='secAutoInstall'>automatically
		  installed</link> (note that if nothing depends on
		  <replaceable>package</replaceable>, this will cause
		  it to be immediately removed).
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>-</literal></term>
	      <listitem>
		<para>
		  Remove <replaceable>package</replaceable>.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>_</literal></term>
	      <listitem>
		<para>
		  Purge <replaceable>package</replaceable>: remove it
		  and all its associated configuration and data files.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>=</literal></term>
	      <listitem>
		<para>
		  Place <replaceable>package</replaceable> on hold:
		  cancel any active installation, upgrade, or removal,
		  and prevent this package from being automatically
		  upgraded in the future.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>:</literal></term>
	      <listitem>
		<para>
		  Keep <replaceable>package</replaceable> at its
		  current version: cancel any installation, removal,
		  or upgrade.  Unlike <quote>hold</quote> (above) this
		  does not prevent automatic upgrades in the future.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>&amp;M</literal></term>
	      <listitem>
		<para>
		  Mark <replaceable>package</replaceable> as having
		  been <link linkend='secAutoInstall'>automatically installed</link>.
		</para>
	      </listitem>
	    </varlistentry>

	    <varlistentry>
	      <term><replaceable>package</replaceable><literal>&amp;m</literal></term>
	      <listitem>
		<para>
		  Mark <replaceable>package</replaceable> as having
		  been <link linkend='secAutoInstall'>manually installed</link>.
		</para>
	      </listitem>
	    </varlistentry>
	  </variablelist>

	  <para>
	    As a special case, <quote><literal>install</literal></quote> with no
	    arguments will act on any stored/pending actions.
	  </para>

	  <note>
	    <para>
	      Once you enter <userinput>Y</userinput> at the final
	      confirmation prompt, the
	      <quote><literal>install</literal></quote> command will
	      modify &aptitude;'s stored information about what
	      actions to perform.  Therefore, if you issue (e.g.) the
	      command <quote><literal>aptitude install foo
	      bar</literal></quote> and then abort the installation
	      once &aptitude; has started downloading and installing
	      packages, you will need to run <quote><literal>aptitude
	      remove foo bar</literal></quote> to cancel that order.
	    </para>
	  </note>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>remove</literal>, <literal>purge</literal>, <literal>hold</literal>, <literal>unhold</literal>, <literal>keep</literal>, <literal>reinstall</literal></term>

	<listitem>
	  <para>
	    These commands are the same as
	    <quote><literal>install</literal></quote>, but apply the
	    named action to all packages given on the command line for
	    which it is not <link
	    linkend='parOverrideSpecifiers'>overridden</link>.  The
	    difference between <literal>hold</literal> and
	    <literal>keep</literal> is that <literal>hold</literal>
	    will cause a package to be ignored by future
	    <literal>safe-upgrade</literal> or <literal>full-upgrade</literal> commands, while
	    <literal>keep</literal> merely cancels any scheduled
	    actions on the package.  <literal>unhold</literal> will
	    allow a package to be upgraded by future
	    <literal>safe-upgrade</literal> or <literal>full-upgrade</literal> commands, without otherwise
	    altering its state.
	  </para>

	  <para>
	    For instance, <quote><literal>aptitude remove
	    '~ndeity'</literal></quote> will remove all packages
	    whose name contains <quote><literal>deity</literal></quote>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>markauto</literal>, <literal>unmarkauto</literal></term>

	<listitem>
	  <para>
	    Mark packages as automatically installed or manually
	    installed, respectively.  Packages are specified in
	    exactly the same way as for the <quote><literal>install</literal></quote> command.
	    For instance, <quote><literal>aptitude markauto
	    '~slibs'</literal></quote> will mark all packages in
	    the <quote><literal>libs</literal></quote> section as
	    having been automatically installed.
	  </para>

	  <para>
	    For more information on automatically installed
	    packages, see the section <quote><link
	    linkend='secAutoInstall'>Managing Automatically
	    Installed Packages</link></quote> in the &aptitude;
	    reference manual.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>forbid-version</literal></term>

	<listitem>
	  <para>
	    Forbid a package from being upgraded to a particular
	    version.  This will prevent aptitude from
	    automatically upgrading to this version, but will
	    allow automatic upgrades to future versions.  By
	    default, aptitude will select the version to which the
	    package would normally be upgraded; you may override
	    this selection by appending <quote><literal>=<replaceable>version</replaceable></literal></quote>
	    to the package name: for instance, <quote><literal>aptitude forbid-version
	    vim=1.2.3.broken-4</literal></quote>.
	  </para>

	  <para>
	    This command is useful for avoiding broken versions of
	    packages without having to set and clear manual holds.
	    If you decide you really want the forbidden version
	    after all, the <quote><literal>install</literal></quote> command will
	    remove the ban.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>update</literal></term>

	<listitem>
	  <para>
	    Updates the list of available packages from the &apt;
	    sources (this is equivalent to <quote><literal>apt-get
	    update</literal></quote>)
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>safe-upgrade</literal></term>

	<listitem>
	  <para>
	    Upgrades installed packages to their most recent
	    version.  Installed packages will not be removed
	    unless they are unused (see the section <quote><link
	    linkend='secAutoInstall'>Managing Automatically
	    Installed Packages</link></quote> in the &aptitude;
	    reference manual); packages which are not currently
	    installed will not be installed.
	  </para>

	  <para>
	      It is sometimes necessary to remove or install one
	      package in order to upgrade another; this command is not
	      able to upgrade packages in such situations.  Use the
	      <link
	      linkend='manpageFullUpgrade'><literal>full-upgrade</literal></link>
	      command to upgrade as many packages as possible.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='manpageFullUpgrade'>
	<term><literal>full-upgrade</literal></term>

	<listitem>
	  <para>
	    Upgrades installed packages to their most recent version,
	    removing or installing packages as necessary.  This
	    command is less conservative than
	    <literal>safe-upgrade</literal> and thus more likely to
	    perform unwanted actions.  However, it is capable of
	    upgrading packages that <literal>safe-upgrade</literal> cannot
	    upgrade.
	  </para>

	  <note>
	    <para>
	      This command was originally named
	      <literal>dist-upgrade</literal> for historical reasons,
	      and &aptitude; still recognizes
	      <literal>dist-upgrade</literal> as a synonym for
	      <literal>full-upgrade</literal>.
	    </para>
	  </note>
	</listitem>
      </varlistentry>

      <varlistentry id='manpageKeepAll'>
	<term><literal>keep-all</literal></term>

	<listitem>
	  <para>
	    Cancels all scheduled actions on all packages; any
	    packages whose sticky state indicates an installation,
	    removal, or upgrade will have this sticky state cleared.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>forget-new</literal></term>

	<listitem>
	  <para>
	    Forgets all internal information about what packages
	    are <quote>new</quote> (equivalent to pressing <quote><keycap>f</keycap></quote> when in visual
	    mode).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>search</literal></term>

	<listitem>
	  <para>
	    Searches for packages matching one of the patterns
	    supplied on the command line.  All packages which
	    match any of the given patterns will be displayed; for
	    instance, <quote><literal>aptitude search
	    '~N' edit</literal></quote> will list all <quote>new</quote> packages and all packages whose name contains <quote>edit</quote>.  For more information on
	    search patterns, see the section <quote><link
	    linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference
	    manual.
	  </para>

	  <para>
	    Unless you pass the <link
	    linkend='cmdlineOptionFormat'><literal>-F</literal></link> option, the output of
	    <literal>aptitude search</literal> will look something
	    like this:
	  </para>

	  <screen>i   apt                             - Advanced front-end for dpkg              
pi  apt-build                       - frontend to apt to build, optimize and in
cp  apt-file                        - APT package searching utility -- command-
ihA raptor-utils                    - Raptor RDF Parser utilities</screen>

          <para>
	    Each search result is listed on a separate line.  The
	    first character of each line indicates the current state
	    of the package: the most common states are
	    <literal>p</literal>, meaning that no trace of the package
	    exists on the system, <literal>c</literal>, meaning that
	    the package was deleted but its configuration files remain
	    on the system, <literal>i</literal>, meaning that the
	    package is installed, and <literal>v</literal>, meaning
	    that the package is virtual.  The second character
	    indicates the stored action (if any; otherwise a blank
	    space is displayed) to be performed on the package, with
	    the most common actions being <literal>i</literal>,
	    meaning that the package will be installed,
	    <literal>d</literal>, meaning that the package will be
	    deleted, and <literal>p</literal>, meaning that the
	    package and its configuration files will be removed.  If
	    the third character is <literal>A</literal>, the package
	    was automatically installed.
	  </para>

	  <para>
	    For a complete list of the possible state and action
	    flags, see the section <quote><link
	    linkend='secAccessingPackageInformation'>Accessing Package
	    Information</link></quote> in the &aptitude; reference
	    guide.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>show</literal></term>

	<listitem>
	  <para>
	    Displays detailed information about one or more
	    packages, listed following the search command.  If a
	    package name contains a tilde character
	    (<quote><literal>~</literal></quote>), it will be
	    treated as a search pattern and all matching packages
	    will be displayed (see the section <quote><link
	    linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference
	    manual).
	  </para>

	  <para>
	    If the verbosity level is 1 or greater (i.e., at least one <literal>-v</literal>
	    is present on the command-line), information about all
	    versions of the package is displayed.  Otherwise, information about
	    the <quote>candidate version</quote> (the version
	    that <quote><literal>aptitude install</literal></quote>
	    would download) is displayed.
	  </para>

	  <para>
	    You can display information about a different version of
	    the package by appending
	    <literal>=<replaceable>version</replaceable></literal> to
	    the package name; you can display the version from a
	    particular archive by appending
	    <literal>/<replaceable>archive</replaceable></literal> to
	    the package name.  If either of these is present, then
	    only the version you request will be displayed, regardless
	    of the verbosity level.
	  </para>

	  <para>
	    If the verbosity level is 1 or greater, the package's
	    architecture, compressed size, filename, and md5sum fields
	    will be displayed.  If the verbosity level is 2 or
	    greater, the select version or versions will be displayed
	    once for each archive in which they are found.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>why</literal>, <literal>why-not</literal></term>

	<listitem>
	  <para>
	    Explains the reason that a particular package can or
	    cannot be installed on the system.
	  </para>

	  <para>
	    This command searches for packages that require or
	    conflict with the given package.  It displays a sequence
	    of dependencies leading to the target package, along with
	    a note indicating the installed state of each package in
	    the dependency chain:
	  </para>

	  <screen>$ aptitude why kdepim
i   nautilus-data Recommends nautilus
i A nautilus      Recommends desktop-base (>= 0.2)
i A desktop-base  Suggests   gnome | kde | xfce4 | wmaker
p   kde           Depends    kdepim (>= 4:3.4.3)</screen>

	  <para>
	    The command <literal>why</literal> finds a dependency
	    chain that installs the package named on the command line,
	    as above.  Note that the dependency that aptitude produced
	    in this case is only a suggestion.  This is because no
	    package installed on my computer depends on or recommends
	    the <systemitem>kdepim</systemitem> package; if a stronger
	    dependency were available, aptitude would have displayed
	    it.
	  </para>

	  <para>
	    In contrast, <literal>why-not</literal> finds a
	    dependency chain leading to a conflict
	    with the target package:
	  </para>

	  <screen>$ aptitude why-not textopo
i   ocaml-core          Depends   ocamlweb
i A ocamlweb            Depends   tetex-extra | texlive-latex-extra
i A texlive-latex-extra Conflicts textopo</screen>

	  <para>
	    If one or more <replaceable>patterns</replaceable> are
	    present, then aptitude will begin its search at these
	    patterns; that is, the first package in the chain it
	    prints will be a package matching the pattern in question.
	    The patterns are considered to be package names unless
	    they contain a tilde character (<literal>~</literal>), in
	    which case they are treated as search patterns (see the
	    section <quote><link linkend='secSearchPatterns'>Search
	    Patterns</link></quote> in the &aptitude; reference
	    manual).
	  </para>

	  <para>
	    If no patterns are present, then &aptitude; will search
	    for dependency chains beginning at manually installed
	    packages.
	  </para>

	  <note>
	    <para>
	      <literal>aptitude why</literal> does not perform full
	      dependency resolution; it only displays direct
	      relationships between packages.  For instance, if A
	      requires B, C requires D, and B and C conflict,
	      <quote><literal>aptitude why-not D</literal></quote>
	      will not produce the answer <quote>A depends on B, B
	      conflicts with C, and D depends on C</quote>.
	    </para>
	  </note>

	  <para>
	    By default aptitude outputs only the <quote>most
	    installed, strongest, tightest, shortest</quote>
	    dependency chain.  That is, it looks for a chain that only
	    contains packages which are installed or will be
	    installed; it looks for the strongest possible
	    dependencies under that restriction; it looks for chains
	    that avoid ORed dependencies and Provides; and it looks
	    for the shortest dependency chain meeting those criteria.
	    These rules are progressively weakened until a match is
	    found.
	  </para>

	  <para>
	    If the verbosity level is 1 or more, then
	    <emphasis>all</emphasis> the explanations aptitude can
	    find will be displayed, in inverse order of relevance.  If
	    the verbosity level is 2 or more, a truly excessive amount
	    of debugging information will be printed to standard
	    output.
	  </para>

	  <para>
	    This command returns 0 if successful, 1 if no explanation
	    could be constructed, and -1 if an error occured.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>clean</literal></term>

	<listitem>
	  <para>
	    Removes all previously downloaded <literal>.deb</literal> files from the package cache
	    directory (usually <filename>/var/cache/apt/archives</filename>).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>autoclean</literal></term>

	<listitem>
	  <para>
	    Removes any cached packages which can no longer be
	    downloaded.  This allows you to prevent a cache from
	    growing out of control over time without completely
	    emptying it.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>changelog</literal></term>

	<listitem>
	  <para>
	    Downloads and displays the Debian changelog for each of
	    the given source or binary packages.
	  </para>

	  <para>
	    By default, the changelog for the version which would be
	    installed with <quote><literal>aptitude
	    install</literal></quote> is downloaded.  You can select a
	    particular version of a package by appending <literal>=<replaceable>version</replaceable></literal> to
	    the package name; you can select the version from a
	    particular archive by appending <literal>/<replaceable>archive</replaceable></literal> to
	    the package name.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>download</literal></term>

	<listitem>
	  <para>
	    Downloads the <literal>.deb</literal> file for the given
	    package to the current directory.
	  </para>

	  <para>
	    By default, the version which would be installed with
	    <quote><literal>aptitude install</literal></quote> is
	    downloaded.  You can select a particular version of a
	    package by appending <literal>=<replaceable>version</replaceable></literal> to
	    the package name; you can select the version from a
	    particular archive by appending <literal>/<replaceable>archive</replaceable></literal> to
	    the package name.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>help</literal></term>

	<listitem>
	  <para>
	    Displays a brief summary of the available commands and
	    options.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Options</title>

    <para>
      The following options may be used to modify the behavior of
      the actions described above.  Note that while all options
      will be accepted for all commands, some options don't apply
      to particular commands and will be ignored by those
      commands.
    </para>

    <variablelist>
      <varlistentry>
	<term><literal>-D</literal>, <literal>--show-deps</literal></term>

	<listitem>
	  <para>
	    For commands that will install or remove packages
	    (<literal>install</literal>, <literal>full-upgrade</literal>,
	    etc), show brief explanations of automatic installations
	    and removals.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Show-Deps'>Aptitude::CmdLine::Show-Deps</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-d</literal>, <literal>--download-only</literal></term>

	<listitem>
	  <para>
	    Download packages to the package cache as necessary, but
	    do not install or remove anything.  By default, the
	    package cache is stored in
	    <filename>/var/cache/apt/archives</filename>.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link
	    linkend='configCmdLine-Download-Only'>Aptitude::CmdLine::Download-Only</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry id='cmdlineOptionFormat'>
	<term>
	  <literal>-F</literal> <replaceable>format</replaceable>, <literal>--display-format</literal> <replaceable>format</replaceable>
	</term>

	<listitem>
	  <para>
	    Specify the format which should be used to display
	    output from the <literal>search</literal> command.
	    For instance, passing <quote><literal>%p %V %v</literal></quote>
	    for <replaceable>format</replaceable> will display a package's name,
	    followed by its currently installed version and its
	    available version (see the section <quote><link linkend='secDisplayFormat'>Customizing how packages are displayed</link></quote> in the &aptitude; reference manual for more information).
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Package-Display-Format'>Aptitude::CmdLine::Package-Display-Format</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-f</literal></term>

	<listitem>
	  <para>
	    Try hard to fix the dependencies of broken packages, even
	    if it means ignoring the actions requested on the command
	    line.
	  </para>

	  <para>
	    This corresponds to the configuration item <literal><link linkend='configCmdLine-Fix-Broken'>Aptitude::CmdLine::Fix-Broken</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>
	  <literal>-h</literal>, <literal>--help</literal>
	</term>

	<listitem>
	  <para>
	    Display a brief help message.  Identical to the <literal>help</literal> action.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--purge-unused</literal></term>

	<listitem>
	  <para>
	    Purge packages that are no longer required by any
	    installed package.  This is equivalent to passing
	    <quote><literal>-o <link linkend='configPurge-Unused'>Aptitude::Purge-Unused=true</link></literal></quote>
	    as a command-line argument.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-P</literal>, <literal>--prompt</literal></term>

	<listitem>
	  <para>
	    Always display a prompt, even when no actions other
	    than those explicitly requested will be performed.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link
	    linkend='configCmdLine-Always-Prompt'>Aptitude::CmdLine::Always-Prompt</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-R</literal>, <literal>--without-recommends</literal></term>

	<listitem>
	  <para>
	    Do <emphasis>not</emphasis> treat recommendations as
	    dependencies when installing new packages (this overrides settings in <filename>/etc/apt/apt.conf</filename> and <filename>~/.aptitude/config</filename>).
	    Packages previously installed due to recommendations
	    will not be removed.
	  </para>

	  <para>
	    This corresponds to the pair of configuration options <literal><link linkend='configRecommends-Important'>Aptitude::Recommends-Important</link></literal> and <literal><link linkend='configKeep-Recommends'>Aptitude::Keep-Recommends</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-r</literal>, <literal>--with-recommends</literal></term>

	<listitem>
	  <para>
	    Treat recommendations as dependencies when installing
	    new packages (this overrides settings in <filename>/etc/apt/apt.conf</filename> and <filename>~/.aptitude/config</filename>).
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configRecommends-Important'>Aptitude::Recommends-Important</link></literal>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-s</literal>, <literal>--simulate</literal></term>

	<listitem>
	  <para>
	    In command-line mode, print the actions that would
	    normally be performed, but don't actually perform them.
	    This does not require &root; privileges.  In the visual
	    interface, always open the cache in read-only mode
	    regardless of whether you are &root;.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link
	    linkend='configSimulate'>Aptitude::Simulate</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--schedule-only</literal></term>

	<listitem>
	  <para>
	    For commands that modify package states, schedule
	    operations to be performed in the future, but don't
	    perform them.  You can execute scheduled actions by
	    running <literal>aptitude install</literal> with no
	    arguments.  This is equivalent to making the corresponding
	    selections in <link linkend='secUsingVisual'>visual
	    mode</link>, then exiting the program normally.
	  </para>

	  <para>
	    For instance, <literal>aptitude --schedule-only install
	    evolution</literal> will schedule the
	    <literal>evolution</literal> package for later
	    installation.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-t</literal> <replaceable>release</replaceable>, <literal>--target-release</literal> <replaceable>release</replaceable></term>

	<listitem>
	  <para>
	    Set the release from which packages should be
	    installed.  For instance, <quote><literal>aptitude -t
	    experimental ...</literal></quote> will install
	    packages from the experimental distribution unless you
	    specify otherwise.  For the command-line actions <quote>changelog</quote>, <quote>download</quote>, and <quote>show</quote>,
	    this is equivalent to appending <literal>/<replaceable>release</replaceable></literal>
	    to each package named on the command-line; for other commands,
	    this will affect the default candidate version of packages
	    according to the rules described in <citerefentry><refentrytitle>apt_preferences</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
	  </para>

	  <para>
	    This corresponds to the configuration item <literal>APT::Default-Release</literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-O</literal> <replaceable>order</replaceable>, <literal>--sort</literal> <replaceable>order</replaceable></term>

	<listitem>
	  <para>
	    Specify the order in which output from the <literal>search</literal>
	    command should be displayed.  For instance, passing <quote><literal>installsize</literal></quote>
	    for <replaceable>order</replaceable> will list packages in
	    order according to their size when installed (see the section <quote><link linkend='secSortingPolicy'>Customizing how packages are sorted</link></quote> in the &aptitude; reference manual for more information).
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-o</literal> <replaceable>key</replaceable><literal>=</literal><replaceable>value</replaceable></term>

	<listitem>
	  <para>
	    Set a configuration file option directly; for
	    instance, use <literal>-o
	    Aptitude::Log=/tmp/my-log</literal> to log &aptitude;'s
	    actions to <filename>/tmp/my-log</filename>.  For more
	    information on configuration file options, see the
	    section <quote><link
	    linkend='secConfigFile'>Configuration file
	    reference</link></quote> in the &aptitude; reference manual.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-q<optional>=<replaceable>n</replaceable></optional></literal>, <literal>--quiet<optional>=<replaceable>n</replaceable></optional></literal></term>

	<listitem>
	  <para>
	    Suppress all incremental progress indicators, thus making
	    the output loggable.  This may be supplied multiple times
	    to make the program quieter, but unlike &apt-get;,
	    &aptitude; does not enable <literal>-y</literal> when <literal>-q</literal>
	    is supplied more than once.
	  </para>


	  <para>
	    The optional <literal>=<replaceable>n</replaceable></literal>
	    may be used to directly set the amount of quietness (for
	    instance, to override a setting in <filename>/etc/apt/apt.conf</filename>);
	    it causes the program to behave as if <literal>-q</literal>
	    had been passed exactly <replaceable>n</replaceable>
	    times.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-V</literal>, <literal>--show-versions</literal></term>

	<listitem>
	  <para>
	    Show which versions of packages will be installed.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Show-Versions'>Aptitude::CmdLine::Show-Versions</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-v</literal>, <literal>--verbose</literal></term>

	<listitem>
	  <para>
	    Causes some commands (for instance, <literal>show</literal>) to display extra information.  This may be supplied multiple times to get more and more information.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Verbose'>Aptitude::CmdLine::Verbose</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--version</literal></term>

	<listitem>
	  <para>
	    Display the version of &aptitude; and some information
	    about how it was compiled.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>--visual-preview</literal></term>

	<listitem>
	  <para>
	    When installing or removing packages from the command
	    line, instead of displaying the usual prompt, start up the
	    visual interface and display its preview screen.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-w</literal> <replaceable>width</replaceable>, <literal>--width</literal> <replaceable>width</replaceable></term>

	<listitem>
	  <para>
	    Specify the display width which should be used for
	    output from the <literal>search</literal> command (by
	    default, the terminal width is used).
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Package-Display-Width'>Aptitude::CmdLine::Package-Display-Width</link></literal>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-y</literal>, <literal>--assume-yes</literal></term>

	<listitem>
	  <para>
	    When a yes/no prompt would be presented, assume that
	    the user entered <quote>yes</quote>.  In particular,
	    suppresses the prompt that appears when installing,
	    upgrading, or removing packages.  Prompts for <quote>dangerous</quote> actions, such as removing
	    essential packages, will still be displayed.  This
	    option overrides <literal>-P</literal>.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Assume-Yes'>Aptitude::CmdLine::Assume-Yes</link></literal>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-Z</literal></term>

	<listitem>
	  <para>
	    Show how much disk space will be used or freed by the
	    individual packages being installed, upgraded, or
	    removed.
	  </para>

	  <para>
	    This corresponds to the configuration option <literal><link linkend='configCmdLine-Show-Size-Changes'>Aptitude::CmdLine::Show-Size-Changes</link></literal>.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>

    <para>
      The following options apply to the visual mode of the
      program, but are primarily for internal use; you generally
      won't need to use them yourself.
    </para>

    <variablelist>
      <varlistentry>
	<term><literal>-S</literal> <replaceable>fname</replaceable></term>

	<listitem>
	  <para>
	    Loads the extended state information from <replaceable>fname</replaceable> instead of the
	    standard state file.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-u</literal></term>

	<listitem>
	  <para>
	    Begins updating the package lists as soon as the
	    program starts.  You cannot use this option and <literal>-i</literal> at the same time.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><literal>-i</literal></term>

	<listitem>
	  <para>
	    Displays a download preview when the program starts
	    (equivalent to starting the program and immediately
	    pressing <quote><keycap>g</keycap></quote>).  You
	    cannot use this option and <quote><literal>-u</literal></quote> at the same time.
	  </para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Environment</title>

    <variablelist>
    <varlistentry>
      <term><literal>HOME</literal></term>

      <listitem>
	<para>
	  If $HOME/.aptitude exists, aptitude will store its
	  configuration file in $HOME/.aptitude/config.  Otherwise, it
	  will look up the current user's home directory using <citerefentry><refentrytitle>getpwuid</refentrytitle><manvolnum>2</manvolnum></citerefentry>
	  and place its configuration file there.
	</para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><literal>PAGER</literal></term>

      <listitem>
	<para>
	  If this environment variable is set, &aptitude; will use it
	  to display changelogs when <quote><literal>aptitude
	  changelog</literal></quote> is invoked.  If not set, it
	  defaults to <literal>more</literal>.
	</para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><literal>TMP</literal></term>

      <listitem>
	<para>
	  If <literal>TMPDIR</literal> is unset, &aptitude; will store
	  its temporary files in <literal>TMP</literal> if that
	  variable is set.  Otherwise, it will store them in
	  <filename>/tmp</filename>.
	</para>
      </listitem>
    </varlistentry>

    <varlistentry>
      <term><literal>TMPDIR</literal></term>

      <listitem>
	<para>
	  &aptitude; will store its temporary files in the directory
	  indicated by this environment variable.  If
	  <literal>TMPDIR</literal> is not set, then
	  <literal>TMP</literal> will be used; if
	  <literal>TMP</literal> is also unset, then &aptitude; will
	  use <filename>/tmp</filename>.
	</para>
      </listitem>
    </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>See Also</title>

    <para>
      <citerefentry><refentrytitle>apt-get</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>apt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <filename>/usr/share/doc/aptitude/html/<replaceable>lang</replaceable>/index.html</filename> from the package aptitude-doc-<replaceable>lang</replaceable>
    </para>
  </refsect1>
</refentry>