How to differentiate a program from its dependencies

sofasurfer

Active Member
Joined
May 24, 2022
Messages
152
Reaction score
51
Credits
1,272
I want a package list from my linux system. When I install a program/package there are many things downloaded. For instance, zim has 503 files associated with it (using $ dpkg -L zim |wc) and its has 28 dependencies ($ apt-cache depends zim |wc). My question is, how can I get a list of only the basic program names in my system such as just ZIM, Nautilus, Disks, etc with no dependencies and no names of the files in the zim package?
 


@sofasurfer , G'day.

Tell us what GNU/Linux you are using, for starters.

Name and version number.

Wizard
 
  • wizard
Reactions: Zev
BTW I know it is a Debian-based one, because of the references to dpkg and apt, but locations for detail can still vary.
 
  • Like
Reactions: Zev
I can't provide an authoritative answer here sorry, (also I like thinking in terms of packages not app-names thus I will be off-tangent anyway sorry), but as a user I usually only installed packages that I know are programs, and it's my manually installed packages that really concern me anyway.

I'll thus use

apt list --manual-installed

One reason for this, is if I make a mistake or stuff up my system, I know I can fix most issues with a non-destructive re-install where system directories get wiped, new system gets re-installed from install media, then the manually installed packages I had, if not present on the newly installed system get auto-reinstalled from Ubuntu repositories (if available for the release I'm using & internet is available during install... the release may seem obvious, but you can use this method to re-install a different release to what you were using thus why I mention it).

This isn't what you're looking for, but its what your question reminded me of, and its something we at Lubuntu actually QA-test for regularly (ie. non-destructive reinstall including re-install of manually installed packages). Its not unique to Lubuntu either, it applies to all flavors and Ubuntu Desktop too, though due to Ubuntu Desktop not including 'universe' by default its easier with flavors.

My tangent answer offered in case helpful...
 
OK, I have several possible answers to this one, one of which I particularly like, and which may suit the OP to a T. :)

I am putting the material together now, and if someone backdoors me, I WILL feel obliged to turn them into a toad.

Back soon.

Wiz
 
OR, given I see that the OP has come back online briefly - Daryl you could try the following, and if you like it, let me know and I will put together a simple way to make a file of it for your own use.

Code:
find /usr/share/applications -maxdepth 1 -type f -exec basename {} .desktop \; | sort

Wizard
 
I expected to be back sooner, in response to some input from the OP, but that has not happened, perhaps we have our wires crossed, and he was expecting me?

So rather than keep any others waiting who may make use of this -

I had explored at least three other options, one generated about 5,000 lines, another similar, and the third about 1,250 lines.

My preferred option is the one as listed in the previous Post.

With that option, in this Linux Mint I am currently writing from within, I get a nice, alphabetised list of only 154 lines, much more palatable than the alternatives.

The way I turn that output into a file is likely known to many, and that is by use of a redirect operand, delineated as

Code:
>


So I choose a filename, in this case, apps-sort.txt

and enter the following

Code:
find /usr/share/applications -maxdepth 1 -type f -exec basename {} .desktop \; | sort > apps-sort.txt

and then I can find it in the root of my $HOME very easily.

Its content is in the Spoiler below (click to open, click to close)

apturl
blueberry
bluetooth-sendto
brave-browser
ccsm
chromium-browser
com.github.maoschanz.drawing
compiz
compton
debian-uxterm
debian-xterm
defaults.list
display-im6.q16
exo-file-manager
exo-mail-reader
exo-preferred-applications
exo-terminal-emulator
exo-web-browser
firefox
flameshot
gcr-prompter
gcr-viewer
gdebi
geoclue-demo-agent
gkbd-keyboard-display
gnome-disk-image-mounter
gnome-disk-image-writer
gnote
gparted
gtkhash
gucharmap
gufw
guidus
hplj1020
hypnotix
im-config
info
io.github.celluloid_player.Celluloid
io.github.Hexchat
kazam
libreoffice-base
libreoffice-calc
libreoffice-draw
libreoffice-impress
libreoffice-math
libreoffice-startcenter
libreoffice-writer
libreoffice-xsltfilter
lightdm-settings
light-locker-settings
menulibre
metacity
mimeinfo.cache
mintbackup
mintdesktop
mintdrivers
mintinstall
mintinstall-fp-handler
mintinstall-kde
mintlocale
mintlocale-im
mintreport
mintreport-tray
mintsources
mintstick
mintstick-format
mintstick-format-kde
mintstick-kde
mintupdate
mintupdate-kde
mintwelcome
mint-window-manager
mkusb
mkusb-plug
mpv
mugshot
multisystem-liveusb
multisystem-vbox
nm-applet
nm-applet_mate
nm-connection-editor
onboard
onboard-settings
openjdk-11-java
org.gnome.baobab
org.gnome.Calculator
org.gnome.DiskUtility
org.gnome.Evolution-alarm-notify
org.gnome.FileRoller
org.gnome.font-viewer
org.gnome.Logs
org.gnome.seahorse.Application
org.xfce.Catfish
org.x.Warpinator
panel-desktop-handler
panel-preferences
pavucontrol
pix
pix-import
python3.8
qemu
qt5ct
redshift
redshift-gtk
rhythmbox
rhythmbox-device
shares
simple-scan
simplescreenrecorder
sol
synaptic
system-config-printer
thunar
thunar-bulk-rename
thunar-settings
thunar-volman-settings
thunderbird
time
timeshift-gtk
transmission-gtk
unetbootin
users
vim
vokoscreen
webapp-manager
xdg-desktop-portal-gtk
xed
xfce4-accessibility-settings
xfce4-appfinder
xfce4-color-settings
xfce4-dict
xfce4-mime-settings
xfce4-notifyd-config
xfce4-power-manager-settings
xfce4-run
xfce4-screenshooter
xfce4-session-logout
xfce4-settings-editor
xfce4-taskmanager
xfce4-terminal
xfce4-terminal-settings
xfce-backdrop-settings
xfce-display-settings
xfce-keyboard-settings
xfce-mouse-settings
xfce-session-settings
xfce-settings-manager
xfce-ui-settings
xfce-wm-settings
xfce-wmtweaks-settings
xfce-workspaces-settings
xreader
xviewer
yelp

It's as easy as that.

Cheers

Wizard
 
for dnf/yum based systems...

dnf list installed | cut -f1 -d.
 

Members online


Latest posts

Top