debian aptitude manual

File Name:debian aptitude manual.pdf
Size:3936 KB
Type:PDF, ePub, eBook, fb2, mobi, txt, doc, rtf, djvu
Category:Book
Uploaded10 May 2019, 19:16 PM
InterfaceEnglish
Rating4.6/5 from 776 votes
StatusAVAILABLE
Last checked16 Minutes ago!

debian aptitude manual

Aptitude is text based and run from a terminal.Some time when you need to resolve conflicts, you discover that you made a mistake; you can easily use 'Cancel pending actions' in the 'Actions' menu so that you can re-select.But you should try the aptitude search foo way. You should discover that the output is a bit different from apt-cache, in some cases, it may be useful to search for a package to see if it is already installed.For most people with 32 bit systems that means the Release Notes for Intel x86. For most with 64 bit systems that means the Release Notes for AMD64. Using full-upgrade in the regular course of events is no longer the recommended practice (unless you are running sid, in which case you should not need to be reading this.) Minor release upgrades (e.g. from lenny 5.0.1 to 5.0.2) and security updates are done with safe-upgrade.The last Aptitude release which shipped a GTK interface was Aptitude 0.6.5 (and the according Debian package aptitude 0.6.5-1). The never-finished Qt interface was never included in any official Debian binary package. While the Git history still contains the GTK and Qt code, the current branches HEADs no more have this code. Bringing them (or any of them) back would mean to re-add the code removed in the according commits and to update it to aptitude's current code on the one hand and the current GTK and Qt code bases on the other hand. Hosting provided by Metropolitan Area Network Darmstadt. It is based on a library which contains the core application, and apt-get is the first front end — command-line based — which was developed within the project.The APT developers reserve the right to change the public interface of this tool to further improve it. On the opposite, the public interface of apt-get is well defined and will not change in any backwards incompatible way. It is thus the tool that you want to use when you need to script package installation requests.http://www.regiapart.si/uporabnik/file/current-chiller-manual.xml

The most recommended interface, apt, is the one that we will use in the examples given in this section. Note, however, that apt-get and aptitude have a very similar command line syntax. When there are major differences between these three commands, these will be detailed.Depending on the speed of your connection and configuration, the operation can take a while, since it involves downloading a certain number of (usually compressed) files ( Packages, Sources, Translation- language-code ), which have gradually become bigger and bigger as Debian has developed (at least 10 MB of data for the main section).However, even after a xz compression, these files can remain rather large (the Packages.xz for the main section of Buster takes more than 7 MB). If you wish to update regularly, these downloads can take up a lot of time.To achieve this, official Debian mirrors distribute different files which list the differences between one version of the Packages file and the following version. They are generated at each update of the archives and a history of one week is kept. Each of these “diff” files only takes a few dozen kilobytes for Unstable, so that the amount of data downloaded by a weekly apt update is often divided by 10. For Stable and Testing, which change less, the gain is even more noticeable.This can also be interesting when network access is very fast but when the processor of the machine to upgrade is rather slow, since the time saved on the download is more than lost when the computer calculates the new versions of these files (starting with the older versions and applying the downloaded differences). To do that, you can use the APT configuration parameter Acquire::PDiffs and set it to false. Acquire::Languages can limit or disable the download of Translation- language-code files and save even more time. For a complete reference see apt.conf (5).http://www.kotlovoi.ru/userfiles/current-dsm-manual.xml

In both cases, APT will automatically install the necessary dependencies or delete the packages which depend on the package that is being removed. The apt purge package command involves a complete uninstallation by deleting the configuration files as well.This can be done quite easily.Next, transfer the pkg-list file onto the computers you want to update and use the following commands:Then dpkg --set-selections restores the selection of packages that you wish to install, and the apt-get invocation executes the required operations.With an apt install command, add “ - ” to the names of the packages you wish to remove.In general, the dependency solver will use that information as a hint to look for alternative solutions.The easiest way to retrieve these files is to reinstall the affected package. Unfortunately, the packaging system finds that the latter is already installed and politely refuses to reinstall it; to avoid this, use the --reinstall option of the apt and apt-get commands. The following command reinstalls postfix even if it is already present:But as you have learned in Section 5.2.3, “Checksums, List of Configuration Files” (see also sidebar GOING FURTHER Force dpkg to ask configuration file questions ), you can use the following command to be asked to install the unmodified version and even restore any deleted configuration file as well. Instead they create it during installation by either copying a skeleton or writing it by a script. In such cases the commands shown above won't work.With this command, it is possible to go back to an older version of a package (if, for instance, you know that it works well), provided that it is still available in one of the sources referenced by the sources.list file. Otherwise the snapshot.debian.org archive can come to the rescue (see sidebar GOING FURTHER Old package versions: snapshot.debian.org ).

In case of frequent updates, this directory can quickly take a lot of disk space with several versions of each package; you should regularly sort through them. Two commands can be used: apt-get clean entirely empties the directory; apt-get autoclean only removes packages which can no longer be downloaded (because they have disappeared from the Debian mirror) and are therefore clearly useless (the configuration parameter APT::Clean-Installed can prevent the removal of.deb files that are currently installed).To upgrade, use apt upgrade, apt-get upgrade or aptitude safe-upgrade (of course after apt update ). This command looks for installed packages which can be upgraded without removing any packages. In other words, the goal is to ensure the least intrusive upgrade possible.If you specified Testing or Unstable in your sources.list, apt upgrade will switch most of your Stable system to Testing or Unstable, which might not be what you intended.With this instruction, apt will complete the upgrade even if it has to remove some obsolete packages or install new dependencies. This is also the command used by users who work daily with the Debian Unstable release and follow its evolution day by day. It is so simple that it hardly needs explanation: APT's reputation is based on this great functionality.Instead, you should use apt-get dist-upgrade (”distribution upgrade”), the historical and well-known command that apt and aptitude also accept for the convenience of users who got used to it.Each directory represents a configuration file which is split over multiple files. APT includes them in alphabetical order, so that the last ones can modify a configuration element defined in one of the first ones.Indeed, the administrator can easily modify the configuration of the software by adding a ready-made file in the directory in question without having to change an existing file.

Package maintainers use the same approach when they need to adapt the configuration of another software to ensure that it perfectly co-exists with theirs. The Debian policy explicitly forbids modifying configuration files of other packages — only users are allowed to do this. Remember that during a package upgrade, the user gets to choose the version of the configuration file that should be kept when a modification has been detected. Any external modification of the file would trigger that request, which would disturb the administrator, who is sure not to have changed anything.It is important to execute the script after any change in that directory so that the most recent modifications are taken into account. In the same way, it is important not to work directly in the configuration file created automatically, since everything would be lost at the next execution of the script. The chosen method (.d directory used directly or a file generated from that directory) is usually dictated by implementation constraints, but in both cases the gains in terms of configuration flexibility more than make up for the small complications that they entail.For instance, you might want to extend one distribution with one or two newer packages from Testing, Unstable or Experimental. It is possible to assign a priority to each available package (the same package can have several priorities depending on its version or the distribution providing it). These priorities will influence APT's behavior: for each package, it will always select the version with the highest priority (except if this version is older than the installed one and if its priority is less than 1000).Each installed package version has a priority of 100. A non-installed version has a priority of 500 by default, but it can jump to 990 if it is part of the target release (defined with the -t command-line option or the APT::Default-Release configuration directive).

APT will always install the highest priority package which follows this constraint. If two packages have the same priority, APT installs the newest one (whose version number is the highest). If two packages of same version have the same priority but differ in their content, APT installs the version that is not installed (this rule has been created to cover the case of a package update without the increment of the revision number, which is usually required).The available selection criteria include the package's name and the source providing it. Every package source is identified by the information contained in a Release file that APT downloads together with the Packages files. It specifies the origin (usually “Debian” for the packages of official mirrors, but it can also be a person's or an organization's name for third-party repositories). It also gives the name of the distribution (usually Stable, Testing, Unstable or Experimental for the standard distributions provided by Debian) together with its version (for example, 10 for Debian Buster ). Let's have a look at its syntax through some realistic case studies of this mechanism.It is still possible (though not recommended) to treat packages of Experimental like those of other distributions by giving them a priority of 500. Pin-Priority: 500Those provided in other versions should not be installed except if explicitly requested. Pin-Priority: 900. Pin-Priority: -10You could use this entry:Pin-Priority: 1001Explanation: in experimental can be used safely. Package: xserver-xorg-video-intel. Pin-Priority: 500For example, after having installed a Stable system, you might want to try out a software package available in Testing or Unstable without diverging too much from the system's initial state.The same obviously applies to Unstable.We will explain this behavior with the help of the default priorities set by APT below.

Do not hesitate to use apt-cache policy (see sidebar TIP apt-cache policy ) to verify the given priorities.The installed version has a priority of 100 but the version available in Stable (the very same) has a priority of 990 (because it is part of the target release). Packages in Testing and Unstable have a priority of 500 (the default priority of a non-installed version). The winner is thus version 1 with a priority of 990. The package “stays in Stable ”.Version 1 is available in Stable and version 3 in Unstable. Version 1 (of priority 990 — thus lower than 1000) is discarded because it is lower than the installed version. This only leaves version 2 and 3, both of priority 500. Faced with this alternative, APT selects the newest version, the one from Unstable. If you don't want a package installed from Testing to migrate to Unstable, you have to assign a priority lower than 500 (490 for example) to packages coming from Unstable. Pin-Priority: 490These packages are called “automatic”, and often include libraries.In all cases, the tools display a clear message listing the affected packages.To get this information from the command line, you can use aptitude why package ( apt and apt-get have no similar feature):Both can still be useful.The resulting list can then serve as a basis to remove unneeded packages.If new packages appear on the system and if debfoster doesn't know them as required packages, they will be shown on the screen together with a list of their dependencies. The program then offers a choice: remove the package (possibly together with those that depend on it), mark it as explicitly required, or ignore it temporarily. It is based on a library which contains the core application, and apt-get is the first front end — command-line based — which was developed within the project.The APT developers reserve the right to change the public interface of this tool to further improve it.

On the opposite, the public interface of apt-get is well defined and will not change in any backwards incompatible way. It is thus the tool that you want to use when you need to script package installation requests.The most recommended interface, apt, is the one that we will use in the examples given in this section. Note, however, that apt-get and aptitude have a very similar command line syntax. When there are major differences between these three commands, these will be detailed.Depending on the speed of your connection and configuration, the operation can take a while, since it involves downloading a certain number of (usually compressed) files ( Packages, Sources, Translation- language-code ), which have gradually become bigger and bigger as Debian has developed (at least 10 MB of data for the main section).However, even after a xz compression, these files can remain rather large (the Packages.xz for the main section of Buster takes more than 7 MB). If you wish to update regularly, these downloads can take up a lot of time.To achieve this, official Debian mirrors distribute different files which list the differences between one version of the Packages file and the following version. They are generated at each update of the archives and a history of one week is kept. Each of these “diff” files only takes a few dozen kilobytes for Unstable, so that the amount of data downloaded by a weekly apt update is often divided by 10. For Stable and Testing, which change less, the gain is even more noticeable.This can also be interesting when network access is very fast but when the processor of the machine to upgrade is rather slow, since the time saved on the download is more than lost when the computer calculates the new versions of these files (starting with the older versions and applying the downloaded differences). To do that, you can use the APT configuration parameter Acquire::PDiffs and set it to false.

Acquire::Languages can limit or disable the download of Translation- language-code files and save even more time. For a complete reference see apt.conf (5).In both cases, APT will automatically install the necessary dependencies or delete the packages which depend on the package that is being removed. The apt purge package command involves a complete uninstallation by deleting the configuration files as well.Then dpkg --set-selections restores the selection of packages that you wish to install, and the apt-get invocation executes the required operations.In general, the dependency solver will use that information as a hint to look for alternative solutions.Instead they create it during installation by either copying a skeleton or writing it by a script. In such cases the commands shown above won't work.In case of frequent updates, this directory can quickly take a lot of disk space with several versions of each package; you should regularly sort through them. Two commands can be used: apt-get clean entirely empties the directory; apt-get autoclean only removes packages which can no longer be downloaded (because they have disappeared from the Debian mirror) and are therefore clearly useless (the configuration parameter APT::Clean-Installed can prevent the removal of.deb files that are currently installed).If two packages have the same priority, APT installs the newest one (whose version number is the highest). If two packages of same version have the same priority but differ in their content, APT installs the version that is not installed (this rule has been created to cover the case of a package update without the increment of the revision number, which is usually required).The available selection criteria include the package's name and the source providing it. Every package source is identified by the information contained in a Release file that APT downloads together with the Packages files.

It specifies the origin (usually “Debian” for the packages of official mirrors, but it can also be a person's or an organization's name for third-party repositories). It also gives the name of the distribution (usually Stable, Testing, Unstable or Experimental for the standard distributions provided by Debian) together with its version (for example, 10 for Debian Buster ). Let's have a look at its syntax through some realistic case studies of this mechanism. Pin-Priority: 500. Pin-Priority: 900. Pin-Priority: -10 You could use this entry:Pin-Priority: 1001Explanation: in experimental can be used safely. Package: xserver-xorg-video-intelVersion 1 is available in Stable and version 3 in Unstable. Version 1 (of priority 990 — thus lower than 1000) is discarded because it is lower than the installed version. This only leaves version 2 and 3, both of priority 500. Faced with this alternative, APT selects the newest version, the one from Unstable. If you don't want a package installed from Testing to migrate to Unstable, you have to assign a priority lower than 500 (490 for example) to packages coming from Unstable.These packages are called “automatic”, and often include libraries.In all cases, the tools display a clear message listing the affected packages.Both can still be useful.The resulting list can then serve as a basis to remove unneeded packages.

Actions may beIf an action is notThe followingThis will prevent aptitude from automatically upgrading to this version, but will allowBy default, aptitude will select the version to which the package would normally be upgraded; you may override thisIf you decide you really want the forbiddenUse the dist-upgrade command to upgradeThis command is less conservative thanUsers are advised to either use upgrade instead or to carefully inspect the list ofAll packages which match any of the given patterns will be displayed; forThe first character of each line indicates the current state of the package: the most common states areThe second character indicates the stored actionIf the thirdIf either of these is present, then only the version youIf the verbosity levelThis allows you to prevent a cache from growing out of control over time without completelyYou can select a particular version of aYou can select a particular version of a package by appendingNote that while all options will be accepted for all commands, someBy default, the package cache is stored inIdentical to the help action.This does not require root privileges. In theYou can execute scheduled actions byThis is equivalent to making the corresponding selections in visual mode, then exiting the program normally.This may be supplied multiple times to make the program quieter, but unlikeThis may be supplied multiple times to get more and more information.In particular, suppresses the prompt that appears when installing, upgrading,This option overrides -P.You cannot use this option and -i at the same time.You cannot use this option andOtherwise, it will store them inIf TMPDIR is not set, then TMP will be. Both the interactive interface and the command line include powerful filters and search patterning. In the CLI, the command is search followed by the search string. In both cases, aptitude lets you input not only parts of the package name and regular expressions, but also special search patterns.

Use L to filter the text lists, where you get a search input box for entering a pattern, as in a search. You can accurately find each package, even if the spelling isn't exactly right. Our example can have an undesirable side effect: It targets LibreOffice but picks up packages with header files (whose names typically are lib -dev ) and removes them, which was not what we wanted. A more precise filtering is using the section name instead of the package name as the pattern. Specific exceptions (e.g., libraries that end up in a system because of a dependency) can be dealt with through corrections to actions (see Table 3). When not used correctly, the action can lead to losing possibly required data. Thus, a setting for packages for the Debian MySQL server can determine whether the system should delete databases during a purge. In any case, a second look before executing the command is advised. Aptitude proves to be much more complex and provides quite a few more options for managing packages. Of course, this also has its downside. The program uses considerably more time to start and end than apt-get. At startup, it reads its additional database to determine status and, when it closes, it saves it back to the hard disk. Conclusion If you want fine-grained yet efficient control of the packages you use, the mighty aptitude provides far and away more options than apt-get. However, it requires a bit more knowledge and a steeping learning curve, whereas apt-get gets a start right out of the gate. Once you have learned to appreciate aptitude's text mode interface with all its options for previewing and filtering, must always remember to call aptitude keep-all before each run, to remove all reservations. If you're writing installation instructions for an Ubuntu package or article, you should make sure you always use apt-get in all your examples. Apt-get provides the basic functionalities and it's best to let the users decide whether to use apt-get or aptitude.

As an author, you can't possibly anticipate what side effects could occur with aptitude. He has assumed the role of mentor, guinea pig, and package sponsor since the restructuring of the aptitude team. Frank Hofmann ( ) works in Berlin as a service provider for typesetting and printing. Since 2008, he's been coordinating the regional meetings of the Linux User Group for the Berlin-Brandenburg region. Which one works best for you. Thank you! If you would like to compile PHP from source as opposed to relying on package maintainers, here's a list of packages, and commands you can run STEP 1: sudo apt-get install autoconf build-essential curl libtool \ libssl-dev libcurl4-openssl-dev libxml2-dev libreadline7 \ libreadline-dev libzip-dev libzip4 nginx openssl \ pkg-config zlib1g-dev So you don't overwrite any existing PHP installs on your system, install PHP in your home directory. STEP 3: Configure PHP. Actions may be performed from a visual interface or from the command-line.If an action is not specified on the command-line,The packages should be listed after theFor example,The following override specifiers are available:Once you enterTherefore, if you issue (e.g.) the commandPackages are specified in exactly the same way as for theThis 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 appendingIf you decide you really want the forbidden version after all, theInstalled packages will not be removed unless they are unused (see the sectionThis command is less conservative thanHowever, it is capable of upgrading packages thatThis command was originally namedAll packages which match any of the given patterns will be displayed; for instance,The first character of each line indicates the current state of the package: the most common states areThe 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 beingIf the third character isOtherwise, information about theIf the verbosity level is 2 or greater, the select version or versions will be displayed once for each archive in which they are found.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: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 theFor instance, if A requires B, C requires D, and B and C conflict,These rules are progressively weakened until a match is found.If the verbosity level is 2 or more, a truly excessive amount of debugging information will be printed to standard output.This allows you to prevent a cache from growing out of control over time without completely emptying it.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.

By default, the package cache is stored inIdentical to theThis is equivalent to passingThis does not requireYou can execute scheduled actions by runningFor instance,For the command-line actionsFor instance, passingThis may be supplied multiple times to make the program quieter, but unlikeThis may be supplied multiple times to get more and more information.Prompts forThis option overridesYou cannot use this option andOtherwise, it will store them inSee the GNU General Public License for more details. This chapter guides you through the various build-time options to customize live-build 's installation of packages. The broadest choices influencing which packages are available to install in the image are the distribution and archive areas. To ensure decent download speeds, you should choose a nearby distribution mirror. You can also add your own repositories for backports, experimental or custom packages, or include packages directly as files. You can define lists of packages, including metapackages which will install many related packages at once, such as packages for a particular desktop or language. Finally, a number of options give some control over apt, or if you prefer, aptitude, at build time when packages are installed. You may find these handy if you use a proxy, want to disable installation of recommended packages to save space, or need to control which versions of packages are installed via APT pinning, to name a few possibilities.Specify the codename, which defaults to buster for the buster version of live-build. Any current distribution carried in the archive may be specified by its codename here. (See Terms for more details.) The --distribution option not only influences the source of packages within the archive, but also instructs live-build to behave as needed to build each supported distribution. For example, to build against the unstable release, sid, specify:In Debian, these are main, contrib and non-free.