Aptitude linux что такое

Aptitude linux что такое

Aptitude is an Ncurses and command-line based front-end to numerous Apt libraries, which are also used by Apt, the default Debian package manager. Aptitude is text based and run from a terminal.

  • a mutt-like syntax for matching packages in a flexible manner
  • mark packages as «automatically installed» or «manually installed» so that packages can be auto-removed when no longer required (feature available in Apt, too, since quite a few Debian release)
  • preview of actions about to be taken with different colors marking different actions
  • persistence of user actions (similar to dselect)
  • the ability to interactively retrieve and display the Debian changelog of all available official packages
  • apt-like (i.e. apt-get and apt-cache) command line mode («aptitude install foo»)
  • Score-based dependency resolver which is more suitable for interactive dependency resolution with additional hints from the user like «I don’t want that part of the solution but keep that other part of the solution for your next try». Apt’s dependency resolver on the other hand is optimized for good «one shot» solutions.

The primary command is «aptitude», as is the name of its primary Debian package.

Aptitude User Manual

  • Online: The manual for the latest version of aptitude is usually available (in English) on the Debian website.
  • On your local system:
    • If you have the package aptitude-doc-en installed (other languages are available), you can find an HTML manual for your installed version in /usr/share/doc/aptitude/html/en/index.html (change path for other languages as appropriate).
    • If you have just aptitude installed (e.g. for disk space reasons), a plain text variant of the user manual is still available at /usr/share/doc/aptitude/README.

    Interactive Use

    To run interactively, enter the following from a terminal emulator:

    • F10 or Ctrl-T to access the menu.
    • ‘?’ for help
    • The ‘up’, ‘down’, ‘left’, ‘right’ keys to navigate.
    • The ‘Enter’ key to select or open and close a single level
    • The bracket keys (‘[‘ and ‘]’) to open and close levels recursively
    • The ‘+’ or ‘-‘ key to install/update or remove a package
    • The ‘g’ key to preview/confirm actions
    • ‘q’ to quit – this also closes the currently open window (‘g’ goes forward, ‘q’ goes back)
    • Forward and backward slash (‘/’ and ‘\’) for searching forward or backward.

    The common use of aptitude in TUI (text user interface) is; run aptitude; press ‘u’ (update the lists of available packages); press ‘U’ (Mark all upgradable packages to be upgraded); (search/select some stuff to install, is optional); press ‘g’ (to see the pending actions and modify if needed); press ‘g’ (again, to start the download).

    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.

    • cursor keys or vi style j/k to select actions or action groups,
    • ‘a’ to explicitly insist on an action (use again to go back to no specific decision)
    • ‘r’ to reject an action (use again to go back to no specific decision)
    • dot (‘.’) to show the next proposed dependency resolution
    • comma (‘,’) to show the previous proposed dependency resolution
    • exclamation mark (‘!’) to accept the currently shown dependency resolution
    • ‘g’ again to go ahead and execute the pending actions
    • ‘q’ to go back to the previous view

    See Accessing package information for understanding the letters in the package synopsis line (e.g., ‘i’ means «will be installed», ‘p’ means «not installed», etc.)

    Commandline Use

    Functions only useful as root

    You can also use aptitude in the same manner as apt-get:

    Functions useful for every user

    Search for packaging containing foo :

    Personally, I still use apt-cache search foo to perform a search – aptitude search foo is slower. 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.

    showing if a specific package is installed :

    How to upgrade your distribution

    Upgrading from one stable release to the next (e.g. Lenny to Squeeze) is done by following the release notes for your architecture. 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.)

    Example for upgrading from, e.g., etch 4.0r1 to 4.0r2 . etc., or applying security upgrades:

    # aptitude update # aptitude safe-upgrade

    Источник

    aptitude command in Linux with examples

    aptitude command in Linux package system opens up a highly built-in interface to interact with the package manager of the machine. It is the control panel of programs and packages in Windows. You can install, upgrade and remove your packages using this well-built interface. Also, the actions can be performed using the command-line(similar to apt-get command) or the visual interface.

    Installation:

    • For Non-Root Users:
    • For Root Users:

    After running the command, the terminal will open up the interactive interface.

    Important Usage of aptitude command:

    • Viewing packages and sub-packages:“-“ at the beginning of a packages means, it has got sub-packages and you can view all of them and check out.
    • Looking at package descriptions: One can perform various operations including Installations, upgrading and removing packages by selecting the options in the menu panel.
    • Any command-line argument can be performed on the terminal, only if root access is provided to the system. To give root-user access to your aptitude terminal, you might exit the terminal and log in to the interface as a root user, or click on the Become root. Provide the credentials and start working again.

    Command-line Actions: If none is specified then aptitude command will enter into the interactive mode and following actions can be performed using the command-line interface.

      install : To install or upgrade the packages. Syntax:

    aptitude install package_name
    aptitude remove package_name
    aptitude purge package_name
    aptitude hold package_name

    Example:

  • showsrc : To display detailed info about a source package (apt wrapper).
  • versions : To display the versions of specified packages.
  • clean : To erase downloaded package files.
  • autoclean : To erase old downloaded package files. Syntax:

    Example:

  • changelog : To view a package’s changelog.
  • download : To download the .deb file for a package (apt wrapper).
  • source : To download source package (apt wrapper).
  • reinstall : To reinstall a currently installed package.
  • why : To get the explanation why a particular package should be installed.
  • why-not : To get the explanation why a particular package cannot be installed.
  • add-user-tag : To add user tag to packages/patterns.
  • remove-user-tag : To remove user tag from packages/patterns.

  • -D, –show-deps : It is used for the commands which are used to install or remove the packages.
  • -d, –download-only : Used to download the packages to the package cache if required. But this option will not install or remove anything.
  • -f : Used to fix the dependencies of the broken packages.
  • -h, –help : It will display a help message and exit.

Источник

AptitudeSurvivalGuide

Aptitude can give you fine grained package management, and will give you an easily traversed map of the ubuntu packages available to you. This page is meant to be a quick reference to aptitude’s interactive mode, and should be enough for you to get started. Aptitude’s manuals are linked under Further Information.

The startup view for aptitude displays a list of the top level groups.

Key commands available when a group is selected

  • [ — Expand the currently selected group, and all its subgroups ] — Collapse the currently selected group, and all its subgroups Enter — Expand or collapse the currently selected group.

Key commands available when a package is selected

  • d — view the package dependencies (packages that this package uses) r — view the reverse dependencies (packages that use this package) Shift-c — download and view the changelog Enter — view information about the selected package

Key commands available everywhere

  • u — update the package lists j — move down one line k — move up one line q — retreat to the previous view (and exit aptitude if at the top view)

The navigation keys (PageUp, Home, PageDown, etc.) work pretty much as expected.

You can navigate through the dependencies of the packages available to you by selecting a package that interests you and following its dependencies or reverse dependencies. Repeat as desired.

Package Management

Aptitude provides straightforward package managment, and artistic use of the available actions (combined with apt-pinning, see PinningHowto) will help you manage unusual repositories, such as backports.

Most common actions on a package

  • + (plus) mark package for installation (minus) mark package for removal _ (underscore) mark package for purging = (equals sign) mark package as held

Committing your actions

  • Press g once to view the marked actions Press g a second time to act

Searching for packages

  • / — (forward slash) search forward for search term or partial package name \ — (back slash) search backwards for search term or partial package name l — (lower case L) limit the view to packages matching the search expression.

Useful search terms

  • ~b — matches broken packages ~c — matches partially uninstalled packages (‘configured, but not installed’) ~ahold — matches held packages ~dtext — searches descriptions for text

~i — matches installed packages

Aptitude from the command line

You can also run aptitude from the command line.

aptitude update

aptitude safe-upgrade

The safest way to upgrade (since Ubuntu 7.10) is to use the action ‘safe-upgrade’ as the previously used action ‘upgrade’ has been deprecated. The new action will upgrade a package only if it does not impact other packages, i-e: if it is necessary to add or remove a dependency package during upgrade, safe-upgrade won’t upgrade.

If you want to force the upgrade anyway, the action ‘full-upgrade’ (previously known as ‘dist-upgrade’) can be used. With this command, aptitude will upgrade to the latest version of a package even if it is necessary to add or remove dependencies.

Search for packages with «gnuplot» in the name

Search for installed packages with «gnuplot» in the name

Search for packages from the section «gnome» that are not installed

For more complex searches and processing, pipelines are your friend:

# aptitude search '~i' | grep -ie 'x11\|xorg' | less

How to free disk space

# aptitude clean --purge-unused

Further information

Troubleshooting apt-get or aptitude or Synaptic package manager errors

Tips

If more than one version is available for a particular package (look at the bottom of the package’s information view), apt-cache policy seems to be the best way to see which comes from which repository.

AptitudeSurvivalGuide (последним исправлял пользователь ckimes 2017-09-06 20:48:23)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

Читайте также:  Установка плагина госуслуги linux
Оцените статью
Adblock
detector