]> git.saurik.com Git - apt.git/blame - doc/apt-config.8.xml
only consider versioned kernel packages in autoremove
[apt.git] / doc / apt-config.8.xml
CommitLineData
24f6490f 1<?xml version="1.0" encoding="utf-8" standalone="no"?>
81cf16a2
DK
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
24f6490f
AL
4
5<!ENTITY % aptent SYSTEM "apt.ent">
6%aptent;
7
0c1a7101
DK
8<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
9%aptverbatiment;
10
694ef56e
DK
11<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
12%aptvendor;
24f6490f
AL
13]>
14
15<refentry>
5e80de29
AL
16
17 <refentryinfo>
18 &apt-author.jgunthorpe;
19 &apt-author.team;
20 &apt-email;
21 &apt-product;
22 <!-- The last update date -->
dabb215c 23 <date>2012-06-09T00:00:00Z</date>
5e80de29 24 </refentryinfo>
24f6490f
AL
25
26 <refmeta>
27 <refentrytitle>apt-config</refentrytitle>
28 <manvolnum>8</manvolnum>
f0599b9c 29 <refmiscinfo class="manual">APT</refmiscinfo>
24f6490f
AL
30 </refmeta>
31
32 <!-- Man page title -->
33 <refnamediv>
34 <refname>apt-config</refname>
35 <refpurpose>APT Configuration Query program</refpurpose>
36 </refnamediv>
37
6e8b4572
DK
38 &synopsis-command-apt-config;
39
24f6490f
AL
40 <refsect1><title>Description</title>
41 <para><command>apt-config</command> is an internal program used by various
42 portions of the APT suite to provide consistent configurability. It accesses
43 the main configuration file <filename>/etc/apt/apt.conf</filename> in a
4b2dad2e 44 manner that is easy to use for scripted applications.</para>
24f6490f
AL
45
46 <para>Unless the <option>-h</option>, or <option>--help</option> option is
aec22160 47 given, one of the commands below must be present.
24f6490f
AL
48 </para>
49
50 <variablelist>
2b9b27c3 51 <varlistentry><term><option>shell</option></term>
24f6490f 52 <listitem><para>
4b2dad2e
JR
53 shell is used to access the configuration information from a shell
54 script. It is given pairs of arguments, the first being a shell
55 variable and the second the configuration value to query. As output
56 it lists shell assignment commands for each value present.
57 In a shell script it should be used as follows:
24f6490f
AL
58 </para>
59
60<informalexample><programlisting>
61OPTS="-f"
62RES=`apt-config shell OPTS MyApp::options`
63eval $RES
64</programlisting></informalexample>
65
66 <para>This will set the shell environment variable $OPTS to the value of
67 MyApp::options with a default of <option>-f</option>.</para>
68
69
70 <para>The configuration item may be postfixed with a /[fdbi]. f returns
71 file names, d returns directories, b returns true or false and i returns
72 an integer. Each of the returns is normalized and verified
73 internally.</para>
74 </listitem>
75 </varlistentry>
76
2b9b27c3 77 <varlistentry><term><option>dump</option></term>
24f6490f
AL
78 <listitem><para>
79 Just show the contents of the configuration space.</para>
80 </listitem>
81 </varlistentry>
82
83 </variablelist>
84 </refsect1>
85
86 <refsect1><title>options</title>
87 &apt-cmdblurb;
88
89 <variablelist>
a8813606
DK
90 <varlistentry>
91 <term><option>--empty</option></term>
92 <listitem><para>Include options which have an empty value. This is the default, so
93 use --no-empty to remove them from the output.</para></listitem>
94 </varlistentry>
95
96 <varlistentry>
97 <term><option>--format '<replaceable>&percnt;f &#x0022;&percnt;v&#x0022;;&percnt;n</replaceable>'</option></term>
4b2dad2e
JR
98 <listitem><para>Defines the output of each config option. &percnt;t will be replaced with its individual name,
99 &percnt;f with its full hierarchical name and &percnt;v with its value.
c086ac18 100 Use uppercase letters and special characters in the value will be encoded to ensure that
4b2dad2e
JR
101 it can e.g. be safely used in a quoted-string as defined by RFC822. Additionally
102 &percnt;n will be replaced by a newline, and &percnt;N by a tab. A &percnt; can be
a8813606
DK
103 printed by using &percnt;&percnt;.</para></listitem>
104 </varlistentry>
105
24f6490f
AL
106 &apt-commonoptions;
107
108 </variablelist>
109 </refsect1>
110
111 <refsect1><title>See Also</title>
5e80de29 112 <para>&apt-conf;
24f6490f
AL
113 </para>
114 </refsect1>
115
116 <refsect1><title>Diagnostics</title>
117 <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
118 </para>
119 </refsect1>
120
121 &manbugs;
24f6490f
AL
122
123</refentry>
124