Enhancing Skills

apt-cache show package_name: Display detailed information about a package

Command: apt-cache show package_name

Used to display detailed information about a specific package from the package cache. This includes the package’s version, description, dependencies, and other metadata.


Sample Command and Output:

$ apt-cache show vim
Package: vim
Priority: optional
Section: editors
Installed-Size: 1,230
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 2:8.1.2269-1ubuntu5
Depends: vim-common (= 2:8.1.2269-1ubuntu5), vim-runtime (= 2:8.1.2269-1ubuntu5), libncurses5 (>= 6), libc6 (>= 2.29)
Description: Vi IMproved - enhanced vi editor
 Vim is an enhanced version of the vi editor that includes many improvements:
  - A more powerful interface
  - Improved syntax highlighting
  - Support for multiple files
  - Extensibility through plugins
Homepage: https://www.vim.org/

Description:

  • apt-cache show <package_name>: Retrieves and displays detailed information about the specified package (vim in this example). This information includes the package’s description, dependencies, maintainer, and version.

Additional Commands and Sample Outputs:

  • apt-cache showpkg package_name: Show detailed information about a package, including versions and dependencies. Sample Command and Output:
  $ apt-cache showpkg vim
  Package: vim
  Versions:
   2:8.1.2269-1ubuntu5 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_binary-amd64_packages)
      Description Language:
      File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_binary-amd64_packages
      MD5: e3d7a5c6e42a9f8b9f4d891f62b7d4f7

  Reverse Depends:
    vim-gtk, vim 2:8.1.2269-1ubuntu5
    vim-tiny, vim 2:8.1.2269-1ubuntu5

Description:

  • apt-cache showpkg <package_name>: Displays detailed information about the package including available versions and reverse dependencies.
  • apt-cache depends package_name: Show package dependencies. Sample Command and Output:
  $ apt-cache depends vim
  vim
    Depends: vim-common
    Depends: vim-runtime
    Depends: libncurses5
    Depends: libc6

Description:

  • apt-cache depends <package_name>: Lists the dependencies required by the specified package. This helps in understanding what other packages are needed for the package to function properly.

Note: Use apt-cache show to get a comprehensive overview of package details before installing or upgrading to ensure compatibility and meet system requirements.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.