Friday, April 19, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 460  / 1 Year ago, sat, april 15, 2023, 1:50:37

I would like to know about package information as i have mentioned in my Question .



For example , There is a installed package in my system . So i want to know whether its a main package or dependency to some other package .



Thank you .


More From » package-management

 Answers
6

Mik has described how one can find the dependencies of a package (those packages which it depends on).



I believe GrSr is trying to find out if any given package has any reverse dependencies - that is, if any packages depend on it.



apt-cache rdepends



An answer to a similar question suggests the use of apt-cache rdepends. For example:



mac9416@lee:~$ apt-cache rdepends ffmpeg
ffmpeg
Reverse Depends:
libavcodec-extra-52
youtube-dl
libavcodec52
imagemagick
ffmpeg-dbg
videotrans
tovid
recorditnow
mytharchive
libavcodec-extra-52
kmediafactory
iriverter
idjc
dvdwizard
dvdrip
dvd95
dvd-slideshow
zoomer
zoneminder
xwax
winff
videoporama
ubuntustudio-video
stopmotion
soundkonverter
rtmpdump
python-scitools
pacpl
mythexport
motion
luciole
lives
libsynfig0
libavbin0
kmplayer
kino
kdenlive
jsymphonic
imagination
gvb
get-iplayer
gallery2
clive
bitpim
libavcodec52
imagemagick
ffmpeg-dbg


An even more dramatic example would be apt-cache rdepends python. A lot of packages depend on Python.



Unfortunately, apt-cache rdepends lists all reverse dependencies regardless of whether they are installed.



apt-get remove



Probably the simplest way to acquire the information you are looking for is to try to remove the package in question. If the package is depended on by other installed packages, they will be listed for removal.



For example, if I try sudo apt-get remove apt:



The following packages will be REMOVED:
apport apport-gtk apt-transport-https apt-xapian-index aptdaemon aptitude apturl command-not-found computer-janitor computer-janitor-gtk gdebi gdebi-core gnome-codec-install jockey-common jockey-gtk
language-selector language-selector-common libept1 network-manager network-manager-gnome python-apport python-aptdaemon python-aptdaemon-gtk python-debian software-properties-gtk synaptic tasksel
tasksel-data ubuntu-minimal ubuntu-standard ubuntustudio-desktop update-manager update-manager-core update-notifier update-notifier-common


Obviously a lot of packages depend on APT. On the
other hand, if I try sudo apt-get remove youtube-dl:



The following packages will be REMOVED:
youtube-dl


No installed packages depend on youtube-dl. It is a "main package" rather than a dependency.



A Word of Caution



I highly recommend you add the -s or --simulate argument to any apt-get remove commands used for this purpose unless you really want to remove a package! This will ensure that you don't accidentally give permission to remove something you wanted to keep. For example:



sudo apt-get remove apt -s
sudo apt-get remove youtube-dl -s

[#36266] Monday, April 17, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eryeath

Total Points: 122
Total Questions: 121
Total Answers: 112

Location: Saint Helena
Member since Fri, Aug 26, 2022
2 Years ago
;