In its basic form, aptitude's configuration file is a list of options and their values. Each line of the file should have the form “Option Value;”: for instance, the following line in the configuration file sets the option Aptitude::Theme to “Dselect”.
Aptitude::Theme "Dselect"; |
An option can “contain” other options if they are written in curly braces between the option and the semicolon following it, like this:
Aptitude::UI { Package-Status-Format ""; Package-Display-Format ""; }; |
An option that contains other options is sometimes called a group. In fact, the double colons that appear in option names are actually a shorthand way of indicating containment: the option Aptitude::UI::Default-Grouping is contained in the group Aptitude::UI, which itself is contained in the group Aptitude. Thus, if you wanted to, you could set this option to "" as follows:
Aptitude { UI { Default-Grouping ""; }; }; |
For more information on the format of the configuration file, see the manual page apt.conf(5).
aptitude's configuration is read from the following sources, in order:
The user's configuration file, ~/.aptitude/config. This file is overwritten when the user modifies settings in the Options menu.
The system configuration file, /etc/apt/apt.conf.
Default values stored in /usr/share/aptitude/aptitude-defaults.
Default values built into the program.
When an option is being checked, these sources are searched in order, and the first one that provides a value for the option is used. For instance, setting an option in /etc/apt/apt.conf will override aptitude's defaults for that option, but will not override user settings in ~/.aptitude/config.
The following configuration options are used by aptitude. Note that these are not the only available configuration options; options used by the underlying apt system are not listed here. See the manual pages apt(8) and apt.conf(5) for information on apt options.
Option: Dir::Aptitude::state
Default: /var/lib/aptitude
Description: The directory in which aptitude's persistent state information is stored.
Option: Aptitude::Allow-Null-Upgrade
Default: false
Description: Normally, if you try to start an install run when no actions will be performed, aptitude will print a warning and return to the package list. If this option is true, aptitude will continue to the preview screen whenever there are upgradable packages, rather than displaying a reminder about the -> (U) command.
Option: Aptitude::Autoclean-After-Update
Default: false
Description: If this option is true, aptitude will clean up obsolete files (see ) every time you update the package list. ->
Option: Aptitude::Auto-Install
Default: true
Description: If this option is true, aptitude will automatically attempt to fulfill the dependencies of a package when you select it for installation.
Option: Aptitude::Auto-Fix-Broken
Default: true
Description: If this option is false, aptitude will ask for permission before attempting to fix any broken packages.
Option: Aptitude::Auto-Upgrade
Default: false
Description: If this option is true, aptitude will automatically flag all upgradable packages for upgrade when the program starts, as if you had issued the command U). -> (
Option: Aptitude::CmdLine::Always-Prompt
Default: false
Description: In command-line mode, if this is set, aptitude will always prompt before starting to install or remove packages, even if the prompt would normally be skipped. This is equivalent to the -P command-line option.
Option: Aptitude::CmdLine::Assume-Yes
Default: false
Description: In command-line mode, if this option is true, aptitude will act as if the user had answered “yes” to every prompt, causing most prompts to be skipped. This is equivalent to the -y command-line option.
Option: Aptitude::CmdLine::Download-Only
Default: false
Description: In command-line mode, if this option is true, aptitude will download package files but not install them. This is equivalent to the -d command-line option.
Option: Aptitude::CmdLine::Fix-Broken
Default: false
Description: In command-line mode, if this option is true, aptitude will be more aggressive when attempting to fix the dependencies of broken packages. This is equivalent to the -f command-line option.
Option: Aptitude::CmdLine::Package-Display-Format
Default: %c%a%M %p# - %d#
Description: This is a format string, as described in the section called “Customizing how packages are displayed”, which is used to display the results of a command-line search. This is equivalent to the -F command-line option.
Option: Aptitude::CmdLine::Package-Display-Width
Default:
Description: This option gives the width in characters for which command-line search results should be formatted. If it is empty (the default; ie, ""), search results will be formatted for the current terminal size, or for an 80-column display if the terminal size cannot be determined.
Option: Aptitude::CmdLine::Show-Deps
Default: false
Description: In command-line mode, if this option is true, aptitude will display a brief summary of the dependencies (if any) relating to a package's state. This is equivalent to the -D command-line option.
Option: Aptitude::CmdLine::Show-Versions
Default: false
Description: In command-line mode, if this option is true, aptitude will display the version of a package that is being installed or removed. This is equivalent to the -V command-line option.
Option: Aptitude::CmdLine::Show-Size-Changes
Default: false
Description: In command-line mode, if this option is true, aptitude will display the expected change in the amount of space used by each package. This is equivalent to the -Z command-line option.
Option: Aptitude::CmdLine::Simulate
Default: false
Description: In command-line mode, causes aptitude to just display the actions that would be performed (rather than actually performing them). This is equivalent to the -s command-line option.
Option: Aptitude::CmdLine::Visual-Preview
Default: false
Description: If this option is true, aptitude will enter its visual mode to display the preview of an installation run and to download packages.
Option: Aptitude::CmdLine::Verbose
Default: 0
Description: This controls how verbose the command-line mode of aptitude is. Every occurance of the -v command-line option adds 1 to this value.
Option: Aptitude::Delete-Unused
Default: true
Description: If this option is true, automatically installed packages which are no longer required will be automatically removed. For more information, see the section called “Managing automatically installed packages”.
Option: Aptitude::Delete-Unused-Pattern
Default:
Description: If Aptitude::Delete-Unused is true, only unused packages which match this pattern (see the section called “Search Patterns”) will be removed. If this option is set to an empty string (the default), all unused packages will be removed.
Option: Aptitude::Display-Planned-Action
Default: true
Description: If this option is true, aptitude will display a preview screen before actually carrying out the actions you have requested.
Option: Aptitude::Forget-New-On-Update
Default: false
Description: If this option is true, aptitude will clear the list of new packages whenever the package list is updated, as if you had issued the command -> (f)
Option: Aptitude::Forget-New-On-Install
Default: false
Description: If this option is true, aptitude will clear the list of new packages whenever you install, upgrade, or remove packages, as if you had issued the command -> (f).
Option: Aptitude::Keep-Suggests
Default: false
Description: If this option is true, aptitude will keep automatically installed packages on the system as long as any installed package suggests them. For more information, see the section called “Managing automatically installed packages”.
Option: Aptitude::Log
Default: /var/log/aptitude
Description: If this is set to a nonempty string, aptitude will log the package installations, removals, and upgrades that it performs. If the value of Aptitude::Log begins with a pipe character (ie, “|”), the remainder of its value is used as the name of a command into which the log will be piped: for instance, |mail -s 'Aptitude install run' root will cause the log to be emailed to root. To log to multiple files or commands, you may set this option to a list of log targets.
Option: Aptitude::Pkg-Display-Limit
Default:
Description: The default filter applied to the package list; see the section called “Search Patterns” for details about its format.
Option: Aptitude::Recommends-Important
Default: true
Description: If this option is true and Aptitude::Auto-Install is true, installing a new package will also install any packages that it recommends.
Option: Aptitude::Suggests-Important
Default: false
Description: This is an obsolete option; use Aptitude::Keep-Suggests instead. Setting this option to true has the same effect as setting Aptitude::Keep-Suggests to true.
Option: Aptitude::Theme
Default:
Description: The theme that aptitude should use; see the section called “Themes” for more information.
Option: Aptitude::Track-Dselect-State
Default: true
Description: If this option is set to true, aptitude will attempt to detect when a change to a package's state has been made using dselect or dpkg: for instance, if you remove a package using dpkg, aptitude will not try to reinstall it. Note that this may be somewhat buggy.
Option: Aptitude::UI::Advance-On-Action
Default: false
Description: If this option is set to true, changing a package's state (for instance, marking it for installation) will cause aptitude to advance the highlight to the next package in the current group.
Option: Aptitude::UI::Auto-Show-Reasons
Default: true
Description: If this option is set to true, selecting a package which is broken or which appears to be causing other packages to be broken will cause the information area to automatically display some reasons why the breakage might be occuring.
Option: Aptitude::UI::Colors
Default:
Description: This is a configuration group whose contents define the color scheme of aptitude. For more information, see the section called “Customizing colors”.
Option: Aptitude::UI::Default-Grouping
Default: filter(missing),status,section(subdir,passthrough),section(topdir)
Description: Sets the default grouping policy used for package lists. See the section called “Customizing the package hierarchy” for additional information on grouping policies.
Option: Aptitude::UI::Default-Preview-Grouping
Default: action
Description: Sets the default grouping policy used for preview screens. See the section called “Customizing the package hierarchy” for additional information on grouping policies.
Option: Aptitude::UI::Description-Visible-By-Default
Default: true
Description: When a package list is first displayed, the information area (which typically contains the long description of the current package) will be visible if this option is true and hidden if it is false.
Option: Aptitude::UI::Default-Package-View
Default:
Description: This option is a group whose members define the default layout of aptitude's display. See the section called “Customizing the display layout” for more information.
Option: Aptitude::UI::Exit-On-Last-Close'
Default: true
Description: If this option is true, closing all the active views will quit aptitude; otherwise, aptitude will not exit until you issue the command -> (Q). See the section called “Working with multiple views” for more information.
Option: Aptitude::UI::Fill-Text
Default: false
Description: If this option is true, aptitude will format descriptions so that each line is exactly the width of the screen.
Option: Aptitude::UI::HelpBar
Default: true
Description: If this option is true, a line of information about important keystrokes will be displayed at the top of the screen.
Option: Aptitude::UI::Incremental-Search
Default: true
Description: If this option is true, aptitude will perform “incremental” searches: as you type the search pattern, it will search for the next package matching what you have typed so far.
Option: Aptitude::UI::Keybindings
Default:
Description: This is a group whose members define the connections between keystrokes and commands in aptitude. For more information, see the section called “Customizing keybindings”.
Option: Aptitude::UI::Menubar-Autohide
Default: false
Description: If this option is set to true, the menu bar will be hidden while it is not in use.
Option: Aptitude::UI::Minibuf-Download-Bar
Default: false
Description: If this option is set to true, aptitude will use a less obtrusive mechanism to display the progress of downloads: a bar at the bottom of the screen will appear which displays the current download status. While the download is active, pressing q will abort it.
Option: Aptitude::UI::Minibuf-Prompts
Default: false
Description: If this option is true, some prompts (such as yes/no and multiple-choice prompts) will be displayed at the bottom of the screen instead of in dialog boxes.
Option: Aptitude::UI::New-Package-Commands
Default: true
Description: If this option is set to false, commands such as +) will have the same deprecated behavior that they did in antique versions of aptitude.
-> (Option: Aptitude::UI::Package-Display-Format
Default: %c%a%M %p %Z %v %V
Description: This option controls the format string used to display packages in package lists. For more information on format strings, see the section called “Customizing how packages are displayed”.
Option: Aptitude::UI::Package-Header-Format
Default: %d
Description: This option controls the format string used to display the header line of package lists (ie, the line that appears between the package list and the menu bar). For more information on format strings, see the section called “Customizing how packages are displayed”.
Option: Aptitude::UI::Package-Status-Format
Default: %d
Description: This option controls the format string used to display the status line of package lists (ie, the line that appears between the package list and the information area). For more information on format strings, see the section called “Customizing how packages are displayed”.
Option: Aptitude::UI::Pause-After-Download
Default: true
Description: If this option is true, aptitude will display a message after it finishes downloading packages, asking you if you want to continue with the installation. Otherwise, it will immediately begin installing the packages.
Option: Aptitude::Preview-Limit
Default:
Description: The default filter applied to the preview screen; see the section called “Search Patterns” for details about its format.
Option: Aptitude::UI::Prompt-On-Exit
Default: true
Description: If this option is true, aptitude will display a confirmation prompt before shutting down.
Option: Aptitude::Warn-Not-Root
Default: true
Description: If this option is true, aptitude will detect when you need root privileges to do something, and ask you whether you want to switch to the root account if you aren't root already. See the section called “Becoming root” for more information.