Forum › Forums › General › Tips and Tricks › Command to find what is installed on your system
- This topic has 8 replies, 6 voices, and was last updated Nov 12-11:15 pm by rokytnji.
-
AuthorPosts
-
February 2, 2022 at 7:04 pm #76664Forum Admin
rokytnji
comm -23 <(apt-mark showmanual|sort) \ <(zcat /var/log/installer/initial-status.gz|sed -n 's/^Package: //p')Just tested on
harry@biker:~ $ inxi -b System: Host: biker Kernel: 5.10.57-antix.1-amd64-smp x86_64 bits: 64 Desktop: IceWM 2.9.5 Distro: antiX-21_x64-full Grup Yorum 31 October 2021 Machine: Type: Laptop System: Dell product: Latitude E4310 v: 0001 serial: <superuser required> Mobo: Dell model: 0T6M8G v: A01 serial: <superuser required> BIOS: Dell v: A03 date: 07/08/2010 Battery: ID-1: BAT0 charge: 40.3 Wh (100.0%) condition: 40.3/48.8 Wh (82.4%) CPU: Info: Dual Core Intel Core i5 M 520 [MT MCP] speed: 1618 MHz min/max: 1199/2400 MHz Graphics: Device-1: Intel Core Processor Integrated Graphics driver: i915 v: kernel Display: x11 server: X.Org 1.20.11 driver: loaded: intel resolution: 1366x768~60Hz OpenGL: renderer: Mesa DRI Intel HD Graphics (ILK) v: 2.1 Mesa 20.3.5 Network: Device-1: Intel 82577LM Gigabit Network driver: e1000e Device-2: Intel Centrino Advanced-N 6200 driver: iwlwifi Drives: Local Storage: total: 55.9 GiB used: 28.14 GiB (50.3%) Info: Processes: 179 Uptime: 11h 22m Memory: 7.7 GiB used: 1.13 GiB (14.7%) Shell: Bash inxi: 3.3.06 harry@biker:~Readout is too large per forum post reply rules on amount of characters.
`
Sometimes I drive a crooked road to get my mind straight.
Not all who Wander are Lost.
I'm not outa place. I'm from outer space.Linux Registered User # 475019
How to Search for AntiX solutions to your problemsFebruary 5, 2022 at 12:57 pm #76858Member
sybok
::Hi, let me compare with an alternate METHOD 2 that I usually apply to get the list of (all?) installed packages:
METHOD 2:
dpkg -l | grep '^ii | awk ' { print $2 } ' | awk -F':' ' {print $1 } ' | sort > INSTALLED_DPKG.txtComment:
The 2nd awk is to remove architecture additions such as ‘:amd64’.1 vs. 2:
In my case of antiX-21 install set to testing, the record count is the following: @rokytnji (METHOD 1) = 842, (METHOD 2) = 2001.
There is a multiplicity in method 2, e.g. consider the ‘audacious’ package(s).
Only the single package ‘audacious’ is listed in method 1 but additional are listed in method 2, e.g. ‘audacious-plugins’.
This is because the command ‘apt-mark showmanual’ ignores automatic dependencies/additions from the list of installed packages.The method 1 is probably better suited if you wish to list installed packages as a backup information before performing an upgrade.
The automatically installed (depedencies) won’t be included and hence the list will be shorter and easier to modify later.October 6, 2022 at 5:13 am #90253Member
sybok
::I noticed that the Method 1 does no longer apply to my antiX-21 (repositories set to testing) because the directory ‘/var/log/installer/’ is no longer present.
Also, the command for Method 2 contained a typo, missing closing tick “‘” in the grep, the fixed version is:
dpkg -l | grep '^ii' | awk ' { print $2 } ' | awk -F':' ' {print $1 } ' | sort > INSTALLED_DPKG.txtOctober 6, 2022 at 3:08 pm #90291Member
techore
::What is the intent of the aforementioned scripts?
I am curious. Not criticizing.
To get a list of all installed packages, I keep it simple and use:
sudo apt list --installedIf the package name is only desired:
sudo apt list --installed | awk -F "/" '{print $1}'- This reply was modified 7 months ago by techore.
October 6, 2022 at 3:57 pm #90293Member
iznit
::techore, those commands [[[ I would not call them “scripts” ]]] intend to deduct from the list all packages that were, already, present when the system was initially installed. Just show package which have been installed after-the-fact.
On antix live system, it has this similar file /usr/share/antiX/installed-packages.txt
a list of already pre-installed packages that were used to build out the live system iso.Why does someone care to know which packages have been installed after-the-fact? I can think of several reasons, reasons beyond just sheer curiosity.
October 7, 2022 at 12:51 pm #90350Member
sybok
::Why you may want to know which packages were added (or are currently installed)?
I mantain a manual list of packages I have installed (e.g. console-based ‘sudoku’ package, favorite alternate players/browsers and codecs) so that I can easily bring all (or most of) the stuff to any new (re-)installation.
I simply copy-paste the package list from such a file to terminal ‘sudo apt install …’ and I once I transfer backup/copy of configuration from ‘/home/$(whoami)/’, the newly installed system is adjusted to my liking much faster.If you do not keep the file, the above is a way to produce corresponding list of additional/all packages.
October 7, 2022 at 5:31 pm #90360Membercalciumsodium
::I mantain a manual list of packages I have installed (e.g. console-based ‘sudoku’ package, favorite alternate players/browsers and codecs) so that I can easily bring all (or most of) the stuff to any new (re-)installation.
I simply copy-paste the package list from such a file to terminal ‘sudo apt install …’ and I once I transfer backup/copy of configuration from ‘/home/$(whoami)/’, the newly installed system is adjusted to my liking much faster.I do the same thing too to what @sybok described in the above quote. It saves me a lot of time. Another thing I do is take periodic iso snapshots of my installed system. It is nice to know others are doing similar things.
November 12, 2022 at 7:27 pm #93111Memberbanned
::Then there is inxi -Fxxc0z
From my time on EndeavourThen there is hard info for a pretty picture 🙂
November 12, 2022 at 11:15 pm #93128Forum Admin
rokytnji
::I just like the easy to read readout.
Here is my MX Fluxbox install.
Like I did not know MX carries cli-aptix out of the box because I did not install it.
- This reply was modified 5 months, 4 weeks ago by rokytnji.
Sometimes I drive a crooked road to get my mind straight.
Not all who Wander are Lost.
I'm not outa place. I'm from outer space.Linux Registered User # 475019
How to Search for AntiX solutions to your problems -
AuthorPosts
- You must be logged in to reply to this topic.