Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to find all possible dependencies of a program?

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
emil_21
Posts: 98
Joined: 2017-04-14 06:13

Re: How to find all possible dependencies of a program?

#21 Post by emil_21 »

If i run sudo apt-get remove `cat list.txt` i get this:

Code: Select all

E: Unsupported file . given on commandline

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: How to find all possible dependencies of a program?

#22 Post by sickpig »

That is because your list.txt contains a . file in it and apt does not know how to process it.

edit - file type

emil_21
Posts: 98
Joined: 2017-04-14 06:13

Re: How to find all possible dependencies of a program?

#23 Post by emil_21 »

Yes, there was . in the first line in the text file, i missed it somehow. But the command still doesn't work after removing the dot sign. I get this when i run sudo apt-get remove `cat list.txt`:

Code: Select all

E: Unable to locate package vlc-plugin-notify_3.0.11-0+deb10u1_amd64.deb
E: Couldn't find any package by glob 'vlc-plugin-notify_3.0.11-0+deb10u1_amd64.deb'
E: Couldn't find any package by regex 'vlc-plugin-notify_3.0.11-0+deb10u1_amd64.deb'
E: Unable to locate package libixml10_1%3a1.8.4-2_amd64.deb
E: Couldn't find any package by glob 'libixml10_1%3a1.8.4-2_amd64.deb'
E: Couldn't find any package by regex 'libixml10_1%3a1.8.4-2_amd64.deb'
E: Unable to locate package libxcb-xv0_1.13.1-2_amd64.deb
E: Couldn't find any package by glob 'libxcb-xv0_1.13.1-2_amd64.deb'
E: Couldn't find any package by regex 'libxcb-xv0_1.13.1-2_amd64.deb'
E: Unable to locate package libupnp13_1%3a1.8.4-2_amd64.deb
E: Couldn't find any package by glob 'libupnp13_1%3a1.8.4-2_amd64.deb'
E: Couldn't find any package by regex 'libupnp13_1%3a1.8.4-2_amd64.deb'
E: Unable to locate package vlc-l10n_3.0.11-0+deb10u1_all.deb
E: Couldn't find any package by glob 'vlc-l10n_3.0.11-0+deb10u1_all.deb'
E: Couldn't find any package by regex 'vlc-l10n_3.0.11-0+deb10u1_all.deb'
E: Unable to locate package libgroupsock8_2018.11.26-1.1_amd64.deb
E: Couldn't find any package by glob 'libgroupsock8_2018.11.26-1.1_amd64.deb'
E: Couldn't find any package by regex 'libgroupsock8_2018.11.26-1.1_amd64.deb'
E: Unable to locate package vlc-data_3.0.11-0+deb10u1_all.deb
E: Couldn't find any package by glob 'vlc-data_3.0.11-0+deb10u1_all.deb'
E: Couldn't find any package by regex 'vlc-data_3.0.11-0+deb10u1_all.deb'
E: Unable to locate package libvlc5_3.0.11-0+deb10u1_amd64.deb
E: Couldn't find any package by glob 'libvlc5_3.0.11-0+deb10u1_amd64.deb'
E: Couldn't find any package by regex 'libvlc5_3.0.11-0+deb10u1_amd64.deb'

I think it's because the .deb files are installed with different names on the system. For example, vlc package is this vlc_3.0.11-0+deb10u1_amd64.deb. But if i run 'dpkg -r vlc_3.0.11-0+deb10u1_amd64.deb' it doesn't find it. I have to run 'dpkg -r vlc' to remove the vlc package. I don't think this method is gonna work.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: How to find all possible dependencies of a program?

#24 Post by stevepusser »

Yes, the apt command works to install local files. I don't know why it's getting vlc from the net instead of using the local deb file, since the command works, and has worked for many many users here if invoked correctly. Try disconnecting from the Net and see what happens! I have right-click "service menus" set up to install arbitrary numbers of debs at once with apt in Dolphin and Thunar, and they could probably be adapted to other file managers.

Anyway, you are now asking a different question than finding dependencies. Removing vlc left all its manually installed dependencies behind as orphans. Gee, if only Debian had some utility to find and list orphans--they could call it "deborphan", even...

Code: Select all

$ apt show deborphan
Package: deborphan
Version: 1.7.31
Priority: optional
Section: admin
Maintainer: deborphan Maintainers <deborphan@packages.debian.org>
Installed-Size: 355 kB
Depends: libc6 (>= 2.14)
Recommends: apt, dialog, gettext-base
Tag: admin::package-management, implemented-in::c, interface::commandline,
 role::program, scope::utility, suite::debian, use::checking,
 use::organizing, works-with::software:package
Download-Size: 106 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian buster/main amd64 Packages
Description: program that can find unused packages, e.g. libraries
 deborphan finds "orphaned" packages on your system. It determines which
 packages have no other packages depending on their installation and shows
 you a list of these packages. It is most useful when finding libraries,
 but it can be used on packages in all sections.
 .
 This package also includes orphaner, a text menu frontend to deborphan.
 Please install the recommended packages dialog, gettext-base and apt when
 you want a working and fully featured orphaner.
MX Linux packager and developer

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: How to find all possible dependencies of a program?

#25 Post by Deb-fan »

^ Thanks for the input Stevep. Also junk like http://forums.debian.net/viewtopic.php?f=16&t=145485 in removal of leftover system chuff but agree w Steve, this has jumped tracks. Then again when doesnt that happen in nix threads? Also is package management related thus discussing the tools has to be relevant. Seen many say aptitude is superior to apt in ways(Steve?), either have a ridiculous number of features/capabilities and would advise using them over dpkg for anything like this. Pointless add here, burnt out on this. Though still wouldn't mind if Op would elaborate a bit as to why/what, shrugs.
Most powerful FREE tech-support tool on the planet * HERE. *

emil_21
Posts: 98
Joined: 2017-04-14 06:13

Re: How to find all possible dependencies of a program?

#26 Post by emil_21 »

stevepusser wrote:Yes, the apt command works to install local files. I don't know why it's getting vlc from the net instead of using the local deb file, since the command works, and has worked for many many users here if invoked correctly. Try disconnecting from the Net and see what happens! I have right-click "service menus" set up to install arbitrary numbers of debs at once with apt in Dolphin and Thunar, and they could probably be adapted to other file managers.

Anyway, you are now asking a different question than finding dependencies. Removing vlc left all its manually installed dependencies behind as orphans. Gee, if only Debian had some utility to find and list orphans--they could call it "deborphan", even...
I disabled the network connection, i am doing this on a virtual machine by the way, and run this command 'sudo apt install ./vlc_3.0.11-0+deb10u1_amd64.deb'. It installed vlc, but still attempted to download the package from internet:

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'vlc' instead of './vlc_3.0.11-0+deb10u1_amd64.deb'
The following NEW packages will be installed:
  vlc
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 141 kB of archives.
After this operation, 229 kB of additional disk space will be used.
Ign:1 http://deb.debian.org/debian-security stable/updates/main amd64 vlc amd64 3.0.11-0+deb10u1
Get:1 http://deb.debian.org/debian-security stable/updates/main amd64 vlc amd64 3.0.11-0+deb10u1 [141 kB]
Selecting previously unselected package vlc.
(Reading database ... 230883 files and directories currently installed.)
Preparing to unpack .../vlc_3.0.11-0+deb10u1_amd64.deb ...
Unpacking vlc (3.0.11-0+deb10u1) ...
Setting up vlc (3.0.11-0+deb10u1) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for desktop-file-utils (0.23-4) ...

If i run 'deborphan' i get this:

Code: Select all

cryptsetup
gnome-tweak-tool
Nothing about vlc dependencies. I don't know how useful deborphan is.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: How to find all possible dependencies of a program?

#27 Post by cuckooflew »

I find this : https://packages.debian.org/buster/apt-rdepends useful , the thread has gotten kind of confusing, so forgive me if it seems irrelevant, but I figured I would mention it.
I don't know how useful deborphan is.
Like any tool, it is useful for what it is intended , maybe try:

Code: Select all

$ deborphan --guess-all 
And see what it says.
https://debian-administration.org/artic ... _deborphan
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: How to find all possible dependencies of a program?

#28 Post by Dai_trying »

emil_21 wrote:I disabled the network connection, i am doing this on a virtual machine by the way, and run this command 'sudo apt install ./vlc_3.0.11-0+deb10u1_amd64.deb'. It installed vlc, but still attempted to download the package from internet:
I can't say for sure but someone else might know, but could it be that if the package has the exact same name (and hence version) as the repository has, then apt will use it's preferred repository (if available) to install it? Just a guess...

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: How to find all possible dependencies of a program?

#29 Post by Deb-fan »

Dunno learning the basic apt cmds ie: "apt show packagename", formerly apt-cache. Shows all depends and other useful stuff, excluded mentioning it, if hasn't already been because isnt going to show depends of depends etc needed on a target system, Dai_trying posted an awesome and eloquent approach though. :)
Most powerful FREE tech-support tool on the planet * HERE. *

arid
Posts: 136
Joined: 2014-05-08 18:40
Location: Aridzona
Has thanked: 3 times
Been thanked: 1 time

Re: How to find all possible dependencies of a program?

#30 Post by arid »

Oh, my!

You've done it again.

ALL can be accomplished with synaptic and orphaner(uses deborphan).

I would hazard a guess of two minutes, to install anything and then remove it
and all it's dependencies.

Been doing it for many years without any dire consequences.

I have much better things to do with my life than screwing around with my OS's
for hours/days/weeks. :mrgreen:
There's no drama in my sid......

Post Reply