jueves, 9 de febrero de 2023

apt-cache

1. apt-cache command to list all packages in the system

You can list the names of all packages in the system using the following command.

 apt-cache pkgnames

2. apt-cache command to display information about the packages

You can specify multiple packages, but the package name must be valid.


apt-cache showpkg package_name


3. apt-cache command to search the package lists

The search command is mostly used command with apt-cache. It helps to search all available package lists for a regex pattern. It prints out the package name with a short description.

$ apt-cache search regex 

4. apt-cache command to display full package records when searching

When you use -f or --full option with search command, it prints out the full package records for each matched package.

 apt-cache -f search regex

5. apt-cache command to show the package records

The show command displays a readable record for the specified package.

$ apt-cache show package_name

6. apt-cache command to show source package records

The showsrc command displays all the source package records that match the given package names. All versions are shown, including all records declaring the name a Binary.

apt-cache showsrc package_name

7. Show raw dependency information for a package with apt-cache command

The depends command helps to display a list of each dependency a package has and all other possible packages that can fulfill that dependency.

apt-cache depends package_name

8. Show reverse dependency information for a package with apt-cache command

You can use rdepends command to list reverse dependencies for a specified package.

apt-cache rdepends package_name

https://www.golinuxcloud.com/apt-cache-command-in-linux/

----------------------------------- 

No hay comentarios:

Publicar un comentario