How to find all possible dependencies of a program?

New to Debian (Or Linux in general)? Ask your questions here!

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

Postby sickpig » 2020-07-30 12:53

emil_21 wrote:If i run 'sudo apt install ./vlc_3.0.11-0+deb10u1_amd64.deb'

That is right but you need to be in the directory from where you are invoking the command. Or just specify the full path to the deb file.
User avatar
sickpig
 
Posts: 412
Joined: 2019-01-23 10:34

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

Postby emil_21 » 2020-07-30 13:47

sickpig wrote:
emil_21 wrote:If i run 'sudo apt install ./vlc_3.0.11-0+deb10u1_amd64.deb'

That is right but you need to be in the directory from where you are invoking the command. Or just specify the full path to the deb file.


What do you mean? I am in the directory where vlc_3.0.11-0+deb10u1_amd64.deb file is.
emil_21
 
Posts: 87
Joined: 2017-04-14 06:13

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

Postby emil_21 » 2020-07-30 13:48

Deb-fan wrote:Lol another funny/cool thing about this, installing apps in chroot.

https://linuxhint.com/use_chroot_debian/

Using chroot jails is a long standing way of isolating applications on a nix os for things like security. Have everything they need to run and enough permissions but not to effect or access to the overall Os. :)

Ps, now that you guys are going back and forth about apt, could've over-misinterpreted what Stevep/Hoas were saying about apt vs dpkg for this too. I still use dpkg for it anyway, if only cause im used to using it now.


I tried to use chroot once for installing apps, but run into lot of problems running apps with gui. For programs that run only in the terminal it works though.
emil_21
 
Posts: 87
Joined: 2017-04-14 06:13

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

Postby emil_21 » 2020-07-30 15:27

I think i found a way that could work for removing vlc dependencies installed with dpkg, but i have problem implementing it. I run this command in the directory with all .deb files for vlc: 'find . > list.txt'. Now, i want to remove the packages from the list.txt, but i am not sure how. I tried these commands, but it didn't worked:

Code: Select all
sudo dpkg -r $(cat list.txt)
sudo apt remove $(cat list.txt)
emil_21
 
Posts: 87
Joined: 2017-04-14 06:13

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

Postby cuckooflew » 2020-07-30 18:24

try
Code: Select all
sudo apt-get remove `cat list.txt`
(in the same directory where list.txt is,or with the correct path to that directory) be sure to pay attention to what it says will be removed.
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"
…one flew east, one flew west,
One flew over the cuckoo’s nest.
cuckooflew
 
Posts: 552
Joined: 2018-05-10 19:34
Location: Some where out west

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

Postby emil_21 » 2020-07-30 19:25

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

Code: Select all
E: Unsupported file . given on commandline
emil_21
 
Posts: 87
Joined: 2017-04-14 06:13

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

Postby sickpig » 2020-07-30 21:23

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

edit - file type
User avatar
sickpig
 
Posts: 412
Joined: 2019-01-23 10:34

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

Postby emil_21 » 2020-07-31 05:41

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.
emil_21
 
Posts: 87
Joined: 2017-04-14 06:13

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

Postby stevepusser » 2020-07-31 06:29

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: LibreOffice 7.0.0, QMPlay2 20.07.04, Pale Moon 28.12.0, KeepassXC 2.6.0, Arqiver 0.6.0+git, Foliate 2.4.2
User avatar
stevepusser
 
Posts: 11891
Joined: 2009-10-06 05:53

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

Postby Deb-fan » 2020-07-31 06:56

^ Thanks for the input Stevep. Also junk like 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. *
Deb-fan
 
Posts: 814
Joined: 2012-08-14 12:27

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

Postby emil_21 » 2020-07-31 07:18

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.
emil_21
 
Posts: 87
Joined: 2017-04-14 06:13

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

Postby cuckooflew » 2020-07-31 17:47

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/article/134/Removing_unnecessary_packages_with_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"
…one flew east, one flew west,
One flew over the cuckoo’s nest.
cuckooflew
 
Posts: 552
Joined: 2018-05-10 19:34
Location: Some where out west

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

Postby Dai_trying » 2020-07-31 19:25

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...
Dai_trying
 
Posts: 936
Joined: 2016-01-07 12:25

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

Postby Deb-fan » 2020-08-01 11:31

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. *
Deb-fan
 
Posts: 814
Joined: 2012-08-14 12:27

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

Postby arid » 2020-08-01 16:58

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......
arid
 
Posts: 89
Joined: 2014-05-08 18:40
Location: Aridzona

Previous

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable