Apt-cahche command offers various services related to information of installed packages:
vikram@vikram-Veriton-Series:~$
apt-cache
apt 0.8.16~exp12ubuntu10.16 for i386 compiled on Nov 15 2013 15:33:41
Usage: apt-cache [options] command
apt-cache [options] showpkg pkg1 [pkg2 ...]
apt-cache [options] showsrc pkg1 [pkg2 ...]
apt-cache is a low-level tool used to query information
from APT's binary cache files
Commands:
gencaches - Build both the package and source cache
showpkg - Show some general information for a single package
showsrc - Show source records
stats - Show some basic statistics
dump - Show the entire file in a terse form
dumpavail - Print an available file to stdout
unmet - Show unmet dependencies
search - Search the package list for a regex pattern
show - Show a readable record for the package
depends - Show raw dependency information for a package
rdepends - Show reverse dependency information for a package
pkgnames - List the names of all packages in the system
dotty - Generate package graphs for GraphViz
xvcg - Generate package graphs for xvcg
policy - Show policy settings
---------------------------------------------------------------------
Exploring various command offering by apt-cache
Using APT-Cache command to list dependency of particular pakages:
---------------------------------------------------------------
vikram@vikram-Veriton-Series:~$ apt-c
apt-cache apt-cdrom apt-config
vikram@vikram-Veriton-Series:~$ apt-cache
apt 0.8.16~exp12ubuntu10.16 for i386 compiled on Nov 15 2013 15:33:41
Usage: apt-cache [options] command
apt-cache [options] showpkg pkg1 [pkg2 ...]
apt-cache [options] showsrc pkg1 [pkg2 ...]
apt-cache is a low-level tool used to query information
from APT's binary cache files
Commands:
gencaches - Build both the package and source cache
showpkg - Show some general information for a single package
showsrc - Show source records
stats - Show some basic statistics
dump - Show the entire file in a terse form
dumpavail - Print an available file to stdout
unmet - Show unmet dependencies
search - Search the package list for a regex pattern
show - Show a readable record for the package
depends - Show raw dependency information for a package
rdepends - Show reverse dependency information for a package
pkgnames - List the names of all packages in the system
dotty - Generate package graphs for GraphViz
xvcg - Generate package graphs for xvcg
policy - Show policy settings
Options:
-h This help text.
-p=? The package cache.
-s=? The source cache.
-q Disable progress indicator.
-i Show only important deps for the unmet command.
-c=? Read this configuration file
-o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-cache(8) and apt.conf(5) manual pages for more information.
vikram@vikram-Veriton-Series:~$ apt-cache qt
E: Invalid operation qt
vikram@vikram-Veriton-Series:~$ apt-cache qt4
E: Invalid operation qt4
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt
Display all 161 possibilities? (y or n)
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-
qt4-bin-dbg qt4-demos-dbg qt4-dev-tools qt4-doc-html qt4-qmake qt4-qtconfig
qt4-demos qt4-designer qt4-doc qt4-linguist-tools qt4-qmlviewer
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-
qt4-bin-dbg qt4-demos-dbg qt4-dev-tools qt4-doc-html qt4-qmake qt4-qtconfig
qt4-demos qt4-designer qt4-doc qt4-linguist-tools qt4-qmlviewer
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos qt4-demos-dbg qt4-designer qt4-dev-tools
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos qt4-demos-dbg qt4-designer qt4-dev-tools
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos qt4-demos-dbg qt4-designer qt4-dev-tools
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-de
qt4-demos qt4-demos-dbg qt4-designer qt4-dev-tools
vikram@vikram-Veriton-Series:~$ apt-cache showpkg qt4-dev-tools
Package: qt4-dev-tools
Versions:
4:4.8.1-0ubuntu4.8 (/var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
MD5: 17ebce770464288a466f921228f3f8f3
Description Language: en
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
MD5: 17ebce770464288a466f921228f3f8f3
4:4.8.1-0ubuntu4.6 (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
MD5: 17ebce770464288a466f921228f3f8f3
Description Language: en
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
MD5: 17ebce770464288a466f921228f3f8f3
4:4.8.1-0ubuntu4.5 (/var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
MD5: 17ebce770464288a466f921228f3f8f3
Description Language: en
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
MD5: 17ebce770464288a466f921228f3f8f3
4:4.8.1-0ubuntu4 (/var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages
MD5: 17ebce770464288a466f921228f3f8f3
Description Language: en
File: /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en
MD5: 17ebce770464288a466f921228f3f8f3
Reverse Depends:
qt4-designer,qt4-dev-tools 4.0.1-2
apt-cache policy qt4-dev-tools
qt4-designer,qt4-dev-tools 4.0.1-2
qt4-doc,qt4-dev-tools
qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4.6
libqt4-dev,qt4-dev-tools
qtikz,qt4-dev-tools
qtcreator-doc,qt4-dev-tools
qt-assistant-compat,qt4-dev-tools 4:4.7.0~
qt-assistant-compat,qt4-dev-tools 4:4.7.0~
qmf-doc-html,qt4-dev-tools
qmf-doc,qt4-dev-tools
pcp-gui,qt4-dev-tools
paraview-dev,qt4-dev-tools 4.3.3-2
paraview-dev,qt4-dev-tools
libsoqt4-dev,qt4-dev-tools
libcgal-demo,qt4-dev-tools
kubuntu-full,qt4-dev-tools
freecad-doc,qt4-dev-tools
eric,qt4-dev-tools
qt4-doc,qt4-dev-tools
qt4-designer,qt4-dev-tools 4.0.1-2
qt4-designer,qt4-dev-tools 4.0.1-2
qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4.5
libqt4-dev,qt4-dev-tools
qtcreator-doc,qt4-dev-tools
qtcreator,qt4-dev-tools
paraview-dev,qt4-dev-tools 4.3.3-2
paraview-dev,qt4-dev-tools
paraview,qt4-dev-tools
qt4-doc,qt4-dev-tools
qt4-designer,qt4-dev-tools 4.0.1-2
qt4-designer,qt4-dev-tools 4.0.1-2
qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4.8
libqt4-dev,qt4-dev-tools
libcgal-demo,qt4-dev-tools
source-highlight-ide,qt4-dev-tools
qtikz,qt4-dev-tools
qtcreator-doc,qt4-dev-tools
qtcreator,qt4-dev-tools
qt-sdk,qt4-dev-tools
qt-assistant-compat,qt4-dev-tools 4:4.7.0~
qt-assistant-compat,qt4-dev-tools 4:4.7.0~
qsource-highlight,qt4-dev-tools
qmf-doc-html,qt4-dev-tools
qmf-doc,qt4-dev-tools
qdevelop,qt4-dev-tools
pcp-gui,qt4-dev-tools
pcp-doc,qt4-dev-tools
paraview-dev,qt4-dev-tools 4.3.3-2
paraview-dev,qt4-dev-tools
paraview,qt4-dev-tools
libsoqt4-dev,qt4-dev-tools
freecad-doc,qt4-dev-tools
eric,qt4-dev-tools
qt4-doc,qt4-dev-tools
qt4-designer,qt4-dev-tools 4.0.1-2
qt4-designer,qt4-dev-tools 4.0.1-2
qt4-demos,qt4-dev-tools 4:4.8.1-0ubuntu4
libqt4-dev,qt4-dev-tools
kubuntu-full,qt4-dev-tools
Dependencies:
4:4.8.1-0ubuntu4.8 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4.8) libqt4-declarative (5 4:4.8.1-0ubuntu4.8) libqt4-help (5 4:4.8.1-0ubuntu4.8) libqt4-xml (5 4:4.8.1-0ubuntu4.8) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4.8) libqtcore4 (5 4:4.8.1-0ubuntu4.8) libqtgui4 (5 4:4.8.1-0ubuntu4.8) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
4:4.8.1-0ubuntu4.6 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4.6) libqt4-declarative (5 4:4.8.1-0ubuntu4.6) libqt4-help (5 4:4.8.1-0ubuntu4.6) libqt4-xml (5 4:4.8.1-0ubuntu4.6) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4.6) libqtcore4 (5 4:4.8.1-0ubuntu4.6) libqtgui4 (5 4:4.8.1-0ubuntu4.6) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
4:4.8.1-0ubuntu4.5 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4.5) libqt4-declarative (5 4:4.8.1-0ubuntu4.5) libqt4-help (5 4:4.8.1-0ubuntu4.5) libqt4-xml (5 4:4.8.1-0ubuntu4.5) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4.5) libqtcore4 (5 4:4.8.1-0ubuntu4.5) libqtgui4 (5 4:4.8.1-0ubuntu4.5) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
4:4.8.1-0ubuntu4 - libqt4-sql-sqlite (0 (null)) libc6 (2 2.4) libgcc1 (2 1:4.1.1) libpng12-0 (2 1.2.13-4) libqt4-dbus (5 4:4.8.1-0ubuntu4) libqt4-declarative (5 4:4.8.1-0ubuntu4) libqt4-help (5 4:4.8.1-0ubuntu4) libqt4-xml (5 4:4.8.1-0ubuntu4) libqt4-xmlpatterns (5 4:4.8.1-0ubuntu4) libqtcore4 (5 4:4.8.1-0ubuntu4) libqtgui4 (5 4:4.8.1-0ubuntu4) libstdc++6 (2 4.4.0) libx11-6 (0 (null)) libxtst6 (0 (null)) qt4-doc-html (0 (null)) libqt4-dev (0 (null)) qt4-designer (0 (null)) qt4-doc (0 (null)) qt3-dev-tools-embedded (0 (null)) libqt4-core (3 4.4.0~beta1-1) libqt4-core (3 4.4.0~beta1-1)
Provides:
4:4.8.1-0ubuntu4.8 -
4:4.8.1-0ubuntu4.6 -
4:4.8.1-0ubuntu4.5 -
4:4.8.1-0ubuntu4 -
Reverse Provides:
-------------------------------------------------
To get basic description of of packages:
vikram@vikram-Veriton-Series:~$ apt-cache stats qt4-dev-tools
Total package names: 62084 (1,242 k)
Total package structures: 62084 (2,980 k)
Normal packages: 46697
Pure virtual packages: 1853
Single virtual packages: 4080
Mixed virtual packages: 1241
Missing: 8213
Total distinct versions: 73982 (4,735 k)
Total distinct descriptions: 104275 (2,503 k)
Total dependencies: 454516 (12.7 M)
Total ver/file relations: 87254 (1,396 k)
Total Desc/File relations: 104275 (1,668 k)
Total Provides mappings: 16315 (326 k)
Total globbed strings: 263 (3,047 )
Total dependency version space: 2,108 k
Total slack space: 58.5 k
Total space accounted for: 22.2 M
vikram@vikram-Veriton-Series:~$
--------------------------------------------------------------------
To List out dependency of a package:
vikram@vikram-Veriton-Series:~$ apt-cache depends qt4-dev-tools
qt4-dev-tools
Depends: libqt4-sql-sqlite
Depends: libc6
Depends: libgcc1
Depends: libpng12-0
Depends: libqt4-dbus
Depends: libqt4-declarative
Depends: libqt4-help
Depends: libqt4-xml
Depends: libqt4-xmlpatterns
Depends: libqtcore4
Depends: libqtgui4
Depends: libstdc++6
Depends: libx11-6
Depends: libxtst6
Suggests: qt4-doc-html
Recommends: libqt4-dev
Recommends: qt4-designer
Recommends: qt4-doc
Conflicts: <qt3-dev-tools-embedded>
Breaks: libqt4-core
Replaces: libqt4-core
------------------------------------------------------------------------
Listing out policies of particular package:
vikram@vikram-Veriton-Series:~$ apt-cache policy qt4-dev-tools
qt4-dev-tools:
Installed: 4:4.8.1-0ubuntu4.6
Candidate: 4:4.8.1-0ubuntu4.8
Version table:
4:4.8.1-0ubuntu4.8 0
500 http://in.archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages
*** 4:4.8.1-0ubuntu4.6 0
100 /var/lib/dpkg/status
4:4.8.1-0ubuntu4.5 0
500 http://security.ubuntu.com/ubuntu/ precise-security/main i386 Packages
4:4.8.1-0ubuntu4 0
500 http://in.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
-----------------------------------------------------------------------
finding unmet dependencies
vikram@vikram-Veriton-Series:~$ apt-cache unmet qt4-dev-tools
Package qt4-dev-tools version 4:4.8.1-0ubuntu4.8 has an unmet dep:
Replaces: libqt4-core (< 4.4.0~beta1-1)
------------------------------------------------------------------
Command: apt-cache search
< package name>
(search - Search the package list for a regex pattern)
vikram@vikram-Veriton-Series:~$ sudo apt-cache search qt4-dev-tools
pyqt4-dev-tools - Development tools for PyQt4
qt4-dev-tools - Qt 4 development tools
qt4-doc - Qt 4 API documentation
freecad-doc - FreeCAD documentation
qmf-doc - Qt Messaging Framework (QMF) - QCH documentation
vikram@vikram-Veriton-Series:~$
-------------------------------------------------------------
Listing out Reverse dependency
Command:
apt-cache rdepends < package name>
rdepends - Show reverse dependency information for a package
vikram@vikram-Veriton-Series:~$ sudo apt-cache rdepends qt4-dev-tools
qt4-dev-tools
Reverse Depends:
qt4-designer
qt4-designer
qt4-doc
qt4-demos
libqt4-dev
qtikz
qtcreator-doc
qt-assistant-compat
qt-assistant-compat
qmf-doc-html
qmf-doc
pcp-gui
paraview-dev
paraview-dev
libsoqt4-dev
libcgal-demo
kubuntu-full
freecad-doc
eric
qt4-doc
qt4-designer
qt4-designer
qt4-demos
libqt4-dev
qtcreator-doc
qtcreator
paraview-dev
paraview-dev
paraview
qt4-doc
qt4-designer
qt4-designer
qt4-demos
libqt4-dev
libcgal-demo
source-highlight-ide
qtikz
qtcreator-doc
qtcreator
qt-sdk
qt-assistant-compat
qt-assistant-compat
qsource-highlight
qmf-doc-html
qmf-doc
qdevelop
pcp-gui
pcp-doc
paraview-dev
paraview-dev
paraview
libsoqt4-dev
freecad-doc
eric
qt4-doc
qt4-designer
qt4-designer
qt4-demos
libqt4-dev
kubuntu-full
--------------------------------------------------------------------------------------
No comments:
Post a Comment