![]() ![]() The apt-cache search command will search package names and, by default, descriptions for the regular expression passed on the command line. ![]() We can use apt-cache policy to confirm that the preferences file is having the desired effect: $ apt-cache policy chromiumġ00 /var/lib/dpkg/status apt-cache search For example, we can ensure that Chromium remains at the current version by putting the following in the /etc/apt/preferences file: Package: chromium When multiple versions of a package are available for installation, as above, Debian allows packages to be “pinned” to a given version (or source). The three asterisks mark the currently installed version, which is not found in any currently defined repository. Looking at the major version numbers, we can see at the top that version 57 is installed, and that the system knows about, and would install, version 61 if we were to run an update or reinstall.įurther down, we can see that version 61 is a security release. Here we can see that an outdated version of the Chromium browser is installed. It takes into account any package pinnings defined in the /etc/apt/preferences file (or /etc/apt/preferences.d/* files): $ apt-cache policy chromium The apt-cache policy command shows which versions of a package apt knows about, which version is installed (if any), and which version would be installed if an install or update were done. In this particular case, the -extraspackage is now provided by byobu itself and thus should not be installed as a separate package. Some packages are incompatible with others, and here we can see that the byobu package “breaks” byobu-extras. The output here is slightly misleading in that apt-cache includes packages that suggest vim, not just that depend on vim, as we can see here: $ apt-cache depends byobu By default, Debian will automatically install required dependencies when installing a package. So, if you install vim-vimoutliner, you’ll need to have vim installed as well. Whereas vim requires all the packages listed by the depends command in order to run, it doesn’t require any of the rdepends packages: $ apt-cache rdepends vim The rdepends (“reverse dependencies”) command looks at this from the other perspective, and lists packages that, in turn, depend on the vim package. ![]() We can also see the “suggested” packages as well. The normal package dependency may be examined with the apt-cache depends command: $ apt-cache depends vimĪbove, we can see that the vim editor depends on the vim-common package (amongst others). Debian can also suggest or recommend additional packages which, whilst not essential, may enhance the functionality of a given package. The Debian GNU/Linux FAQ defines the exact meanings of depends, suggests, etc. Like most distributions, Debian has a concept of package dependencies whereby package A requires package B to be installed. We’ll look here at the following commands provided by apt-cache: It examines the package cache on the system, but it does not make changes to the system (other than possibly updating the package cache), and thus most uses of apt-cache do not require the user to be root. The apt-cache command is part of the apt package, and will (or should) be installed on all Debian systems. If you’re managing any Debian (or Debian-derived) systems, this is a command worth being aware of. Here, we look at some of the facilities that apt-cache provides. Of the Debian system management tools, apt-cache is perhaps one of the lesser known commands. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |