• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

apt-cache: command not found

by admin

The apt-cache command is a utility provided by the Advanced Packaging Tool (APT) system, which is used to manage software packages on Ubuntu and other Debian-based Linux distributions. It allows you to search for and list the available packages in the APT package repository, as well as show information about a specific package.

For example, you can use the apt-cache search command to search for a package that provides a particular utility or library, like this:

# apt-cache search nginx

This will list all the packages that match the search term “nginx”. To show information about a specific package, you can use the apt-cache show command, like this:

# apt-cache show nginx

This will display detailed information about the nginx package, such as its version, dependencies, and the files it installs.

If you encounter the below error while running the apt-cache command:

apt-cache: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install apt
Ubuntu apt-get install apt
Kali Linux apt-get install apt
Fedora dnf install apt
Raspbian apt-get install apt

apt-cache Command Examples

1. Search for a package in your current sources:

# apt-cache search {{query}}

2. Show information about a package:

# apt-cache show {{package}}

3. Show whether a package is installed and up to date:

# apt-cache policy {{package}}

4. Show dependencies for a package:

# apt-cache depends {{package}}

5. Show packages that depend on a particular package:

# apt-cache rdepends {{package}}

Filed Under: Linux

Some more articles you might also be interested in …

  1. mdbook Command Examples in Linux
  2. lastcomm: command not found
  3. getsebool: command not found
  4. finch Command Examples in Linux
  5. nmcli device Command Examples in Linux
  6. gnome-extension Command Examples in Linux
  7. blastp: command not found
  8. Linux OS Service ‘nscd’
  9. How to blacklist a local disk using the “find_multipaths” directive in CentOS/RHEL 6
  10. lspci: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright