SOLVED :- 19.2 Mate:- can i export list of installed applications?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
User avatar
Boca
Level 4
Level 4
Posts: 475
Joined: Sun Feb 15, 2015 5:02 am

SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by Boca » Fri Aug 23, 2019 4:19 am

I keep a list of software I have installed so that, if I need to reinstall, I have a checklist of things to reinstall, configure etc.

My list comes from manually accessing Software Manager - Installed Applications.

I would like to automate this

Is it possible to routinely access/export this list ( eg via crontab) so I can have an off-machine copy for use during a re-install?

Tony

Code: Select all

tony@tony-Latitude-E6430:~$ inxi -Fxz
System:
  Host: tony-Latitude-E6430 Kernel: 4.15.0-58-generic x86_64 bits: 64 
  compiler: gcc v: 7.4.0 Desktop: MATE 1.22.0 Distro: Linux Mint 19.2 Tina 
  base: Ubuntu 18.04 bionic 
Machine:
  Type: Laptop System: Dell product: Latitude E6430 v: 01 serial: <filter> 
  Mobo: Dell model: 0CPWYR v: A00 serial: <filter> BIOS: Dell v: A07 
  date: 10/08/2012 
Battery:
  ID-1: BAT0 charge: 62.2 Wh condition: 39.6/62.2 Wh (64%) 
  model: SMP DELL MKD6223 status: Full 
CPU:
  Topology: Dual Core model: Intel Core i5-3210M bits: 64 type: MT MCP 
  arch: Ivy Bridge rev: 9 L2 cache: 3072 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19934 
  Speed: 1243 MHz min/max: 1200/3100 MHz Core speeds (MHz): 1: 1196 2: 1196 
  3: 1196 4: 1196 
Graphics:
  Device-1: Intel 3rd Gen Core processor Graphics vendor: Dell driver: i915 
  v: kernel bus ID: 00:02.0 
  Display: x11 server: X.Org 1.19.6 driver: modesetting unloaded: fbdev,vesa 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile v: 4.2 Mesa 19.0.8 
  direct render: Yes 
Audio:
  Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Dell 
  driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
  Device-2: Generalplus type: USB driver: hid-generic,snd-usb-audio,usbhid 
  bus ID: 3-4.3:4 
  Sound Server: ALSA v: k4.15.0-58-generic 
Network:
  Device-1: Intel 82579LM Gigabit Network vendor: Dell driver: e1000e 
  v: 3.2.6-k port: f080 bus ID: 00:19.0 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Centrino Ultimate-N 6300 driver: iwlwifi v: kernel 
  port: f040 bus ID: 02:00.0 
  IF: wlp2s0 state: up mac: <filter> 
Drives:
  Local Storage: total: 2.18 TiB used: 893.66 GiB (40.0%) 
  ID-1: /dev/mmcblk0 model: SU01G size: 968.8 MiB 
  ID-2: /dev/sda vendor: Hitachi model: HTS722080K9A300 size: 74.53 GiB 
  ID-3: /dev/sdb vendor: Toshiba model: MK3261GSYN size: 298.09 GiB 
  ID-4: /dev/sdc type: USB vendor: Western Digital model: WD Elements 25A2 
  size: 1.82 TiB 
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci 
  v: 3.0 bus ID: 00:1f.2 
Partition:
  ID-1: / size: 72.86 GiB used: 53.50 GiB (73.4%) fs: ext4 dev: /dev/sda1 
Sensors:
  System Temperatures: cpu: 52.0 C mobo: 39.0 C sodimm: 38.0 C 
  Fan Speeds (RPM): cpu: 2678 
Info:
  Processes: 213 Uptime: 4d 12h 32m Memory: 11.60 GiB used: 4.87 GiB (41.9%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.4.0 Shell: bash v: 4.4.20 
  inxi: 3.0.32 
Last edited by Boca on Sat Aug 24, 2019 1:12 am, edited 1 time in total.

gm10
Level 20
Level 20
Posts: 10132
Joined: Thu Jun 21, 2018 5:11 pm

Re: 19.2 Mate:- can i export list of installed applications?

Post by gm10 » Fri Aug 23, 2019 4:23 am

Here's a script of mine that sort of does that, adapt to your needs:

Code: Select all

#!/bin/sh
cd $HOME
RESTORE_SCRIPT=restore_packages.sh

LIST_INITIAL=pkg_list_initial.txt
LIST_CURRENT=pkg_list_current.txt
zgrep '^Package:' /var/log/installer/initial-status.gz|sed 's/.* //'|sort > $LIST_INITIAL
apt-mark showmanual|sort > $LIST_CURRENT
echo -e '#!/bin/sh\napt install' $(comm -23 $LIST_CURRENT $LIST_INITIAL) $(comm -13 $LIST_CURRENT $LIST_INITIAL|sed 's/.*/&-/') > $RESTORE_SCRIPT
chmod +x $RESTORE_SCRIPT
rm $LIST_CURRENT $LIST_INITIAL
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
Boca
Level 4
Level 4
Posts: 475
Joined: Sun Feb 15, 2015 5:02 am

Re: 19.2 Mate:- can i export list of installed applications?

Post by Boca » Fri Aug 23, 2019 4:32 am

Brilliant, I'll give it a go.

Thanks for the super-speedy response

Tony

User avatar
Boca
Level 4
Level 4
Posts: 475
Joined: Sun Feb 15, 2015 5:02 am

Re: 19.2 Mate:- can i export list of installed applications?

Post by Boca » Fri Aug 23, 2019 5:43 am

Hi,

am stepping through this to, try to, understand it

Do I need a copy of restore_packages.sh?

Tony

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: 19.2 Mate:- can i export list of installed applications?

Post by TI58C » Fri Aug 23, 2019 5:56 am

Or see viewtopic.php?f=90&t=252813&start=40#p1617187

Based on the same idea as gm10's solution. But will also filter out libs, kernels. And make the output of apt-get install a lot better readable.

Improved version:

Code: Select all

outputfile="reinstall.sh" ; comm -23 <(apt-mark showmanual | sort -u) <(zcat /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) | awk ' BEGIN {printf "#!/bin/bash\n\n# Usage : sudo ./reinstall.sh | tee reinstall_log.txt\n\n"} $0 !~/^lib.*|^linux-.*|.*-common$|^g[++].*|^gcj-.*|^nautilus.*/ {printf "\nprintf \"\\n# Installing package : \"" $0 "\nprintf \"\\n\"" "\napt-get install -y " $0 "\nprintf \"\\n\\n\\n-------------------------------------------------------------------------------\\n\\n\\n\"" ; printf "\n" } ' > "$outputfile" ; chmod 777 ./"$outputfile"

Will produce a bash-script "reinstall.sh"
Usage : sudo ./reinstall.sh | tee reinstall.log. Output will go to screen and to file reinstall.log

Robert

EDIT saw your post 23/8 11.43

No, both gm10's solution and my one-liner will produce a shell script that you can run to reinstall all packages that you istalled manually. Will include everything you installed by synaptic, software manager, apt-get install. Everything that is based on dpkg.

Tip: if you reinstall MS-corefonts, you will have to agree to copyright. So hands-off install will stop at that point until you agree
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

User avatar
Boca
Level 4
Level 4
Posts: 475
Joined: Sun Feb 15, 2015 5:02 am

Re: 19.2 Mate:- can i export list of installed applications?

Post by Boca » Fri Aug 23, 2019 7:08 am

TI58C wrote:
Fri Aug 23, 2019 5:56 am
Or see viewtopic.php?f=90&t=252813&start=40#p1617187

Based on the same idea as gm10's solution. But will also filter out libs, kernels. And make the output of apt-get install a lot better readable.

Improved version:

Code: Select all

outputfile="reinstall.sh" ; comm -23 <(apt-mark showmanual | sort -u) <(zcat /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) | awk ' BEGIN {printf "#!/bin/bash\n\n# Usage : sudo ./reinstall.sh | tee reinstall_log.txt\n\n"} $0 !~/^lib.*|^linux-.*|.*-common$|^g[++].*|^gcj-.*|^nautilus.*/ {printf "\nprintf \"\\n# Installing package : \"" $0 "\nprintf \"\\n\"" "\napt-get install -y " $0 "\nprintf \"\\n\\n\\n-------------------------------------------------------------------------------\\n\\n\\n\"" ; printf "\n" } ' > "$outputfile" ; chmod 777 ./"$outputfile"

Will produce a bash-script "reinstall.sh"
Usage : sudo ./reinstall.sh | tee reinstall.log. Output will go to screen and to file reinstall.log

Robert

EDIT saw your post 23/8 11.43

No, both gm10's solution and my one-liner will produce a shell script that you can run to reinstall all packages that you istalled manually. Will include everything you installed by synaptic, software manager, apt-get install. Everything that is based on dpkg.

Tip: if you reinstall MS-corefonts, you will have to agree to copyright. So hands-off install will stop at that point until you agree

Excellent, worked "straight from the box". Although, I cannot pretend to understand the full syntax!

Thank you to both for your help.

Tony

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: 19.2 Mate:- can i export list of installed applications?

Post by TI58C » Fri Aug 23, 2019 8:47 am

Hi Boca,

As to syntax:

outputfile="reinstall.sh"
create a variable with the name of the shell-script we are going to create

comm -23 <(apt-mark showmanual | sort -u) <(zcat /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

Command "comm" compares two sorted! text files (long lists). comm -23 means: show lines from first file that are not in second file and not in both first and second file.

In this case the two inputs are not files, but the results of (a series of) bash commands.
The line is basically structured like this: comm -23 <(bash commands1) <(bash comands2)

bash commands1 : apt-mark showmanual | sort -u.
apt-mark is a sister program of apt-get. showmanual will give you a lis of files that are marked by apt as manually installed (so no dependencies). This list may contain some stuff that is not truly installed by you but by system. List is then sorted.

bash commands2:
zcat /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u

The packages that came included in your Mint installation are stored in compressed format in /var/log/installer/initial-status.gz. command "zcat" is like "cat", but will decompress and list the contents of the .gz file.
The "sed" statement filters out only lines containing "Package", then replaces the word "Package" with empty string and prints that line.
The resulting list is then sorted.

so the output of "bash commands1" and "bash commands2" is given to comm. Result is a list of manually installed packages that were not included in your standard Mint install and marked as manually installed


The output from command comm is then sent (piped , | ) to awk.
Awk prints "Shebang" necessary for bash-script, then filters the "comm" output (removes libraries, linux kernel packages, C-compilers and nautilus that were installed by system, but still marked as manually installed).
Then awk writes an apt-get install -y line for each package in the filtered list, along with some lines in the resulting script that will separate the apt-get install output messages so reading log file is easier.

The oneliner conclude with
> "$outputfile" ; chmod 777 ./"$outputfile"
Writes everything to "$outputfile". Variable outputfile contains "reinstall.sh", the name of the resulting bash-script.
The bash script "reinstall.sh" is then made executable by chmod.

That's it.


Robert


PS: Almost forgot:

The reinstall will work OK for packages in the standard repositories. If you installed packages from external PPA's, the reinstall will only succeed if these PPA's are added (see in mint update).

Separate.deb packages that you downloaded and installed by gdebi or dpkg -i , will be in reinstall.sh, but apt-get will produce error message in the log file. These .deb files you will have to reinstall manually.
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

User avatar
Boca
Level 4
Level 4
Posts: 475
Joined: Sun Feb 15, 2015 5:02 am

Re: 19.2 Mate:- can i export list of installed applications?

Post by Boca » Fri Aug 23, 2019 11:24 am

TI58C wrote:
Fri Aug 23, 2019 8:47 am
Hi Boca,

As to syntax:

outputfile="reinstall.sh"
create a variable with the name of the shell-script we are going to create

comm -23 <(apt-mark showmanual | sort -u) <(zcat /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

Command "comm" compares two sorted! text files (long lists). comm -23 means: show lines from first file that are not in second file and not in both first and second file.

In this case the two inputs are not files, but the results of (a series of) bash commands.
The line is basically structured like this: comm -23 <(bash commands1) <(bash comands2)

bash commands1 : apt-mark showmanual | sort -u.
apt-mark is a sister program of apt-get. showmanual will give you a lis of files that are marked by apt as manually installed (so no dependencies). This list may contain some stuff that is not truly installed by you but by system. List is then sorted.

bash commands2:
zcat /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u

The packages that came included in your Mint installation are stored in compressed format in /var/log/installer/initial-status.gz. command "zcat" is like "cat", but will decompress and list the contents of the .gz file.
The "sed" statement filters out only lines containing "Package", then replaces the word "Package" with empty string and prints that line.
The resulting list is then sorted.

so the output of "bash commands1" and "bash commands2" is given to comm. Result is a list of manually installed packages that were not included in your standard Mint install and marked as manually installed


The output from command comm is then sent (piped , | ) to awk.
Awk prints "Shebang" necessary for bash-script, then filters the "comm" output (removes libraries, linux kernel packages, C-compilers and nautilus that were installed by system, but still marked as manually installed).
Then awk writes an apt-get install -y line for each package in the filtered list, along with some lines in the resulting script that will separate the apt-get install output messages so reading log file is easier.

The oneliner conclude with
> "$outputfile" ; chmod 777 ./"$outputfile"
Writes everything to "$outputfile". Variable outputfile contains "reinstall.sh", the name of the resulting bash-script.
The bash script "reinstall.sh" is then made executable by chmod.

That's it.


Robert


PS: Almost forgot:

The reinstall will work OK for packages in the standard repositories. If you installed packages from external PPA's, the reinstall will only succeed if these PPA's are added (see in mint update).

Separate.deb packages that you downloaded and installed by gdebi or dpkg -i , will be in reinstall.sh, but apt-get will produce error message in the log file. These .deb files you will have to reinstall manually.
Excellent... thank you.

gm10
Level 20
Level 20
Posts: 10132
Joined: Thu Jun 21, 2018 5:11 pm

Re: 19.2 Mate:- can i export list of installed applications?

Post by gm10 » Fri Aug 23, 2019 11:27 am

Just for completeness sake, there's also the Backup Tool (mintbackup) which allows you to export and restore the list of installed applications via a GUI. But it cannot be automated.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: 19.2 Mate:- can i export list of installed applications?

Post by TI58C » Fri Aug 23, 2019 12:19 pm

gm10 wrote:
Fri Aug 23, 2019 11:27 am
Just for completeness sake, there's also the Backup Tool (mintbackup) which allows you to export and restore the list of installed applications via a GUI. But it cannot be automated.
Yup, I use both. In Dutch, there is an expression that is a bit difficult to translate. Basically, it says : "a doubly stitched seam will hold better". Secondary there is also a slang meaning that translates "doubly stitched" as "being screwed twice".

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

User avatar
Larry78723
Level 7
Level 7
Posts: 1660
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by Larry78723 » Tue Aug 27, 2019 8:25 am

gm10, in your script, "zgrep '^Package:' /var/log/installer/initial-status.gz|sed 's/.* //'|sort > $LIST_INITIAL" throws a 'file not found' error when run in 19.2 Cinnamon. I've manually checked and there is no /var/log/installer folder. Can you tell me where else I might look for it? I'm running your ppa improvements.

What I'd like to do is improve your script to run a diff between the initial and current files so all that's left is what's been installed since initial install.


Thanks,
Larry
Image

gm10
Level 20
Level 20
Posts: 10132
Joined: Thu Jun 21, 2018 5:11 pm

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by gm10 » Tue Aug 27, 2019 8:48 am

Larry78723 wrote:
Tue Aug 27, 2019 8:25 am
gm10, in your script, "zgrep '^Package:' /var/log/installer/initial-status.gz|sed 's/.* //'|sort > $LIST_INITIAL" throws a 'file not found' error when run in 19.2 Cinnamon. I've manually checked and there is no /var/log/installer folder. Can you tell me where else I might look for it? I'm running your ppa improvements.
That's the installer log file. The only way you don't have it is if you deleted that yourself (e.g. by using Bleachbit). No way to get it back although you could try to copy it over from another install of the same DE, boot mode, etc. - should be similar enough then.
Larry78723 wrote:
Tue Aug 27, 2019 8:25 am
What I'd like to do is improve your script to run a diff between the initial and current files so all that's left is what's been installed since initial install.
That's what the script is already doing as long as you've got the installer log, i.e. the initial state.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
Larry78723
Level 7
Level 7
Posts: 1660
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by Larry78723 » Tue Aug 27, 2019 8:59 am

gm10, as far as I know, I haven't touched any of the log files. I don't use bleachbit or any other cleaning app. I have plenty of room on my backup drive, so might do an install on it and see if it's on there.

EDIT: found the log on the fresh install and copied to my modified (original) install. Ran the script and it works great.

Thanks much,
Larry
Last edited by Larry78723 on Tue Aug 27, 2019 9:41 am, edited 1 time in total.
Image

gm10
Level 20
Level 20
Posts: 10132
Joined: Thu Jun 21, 2018 5:11 pm

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by gm10 » Tue Aug 27, 2019 9:19 am

Larry78723 wrote:
Tue Aug 27, 2019 8:59 am
gm10, as far as I know, I haven't touched any of the log files. I don't use bleachbit or any other cleaning app. I have plenty of room on my backup drive, so might do an install on it and see if it's on there.
Hmm, I guess there's also the possibility that the 19.2 installer doesn't leave a log file behind (I never installed 19.2 so dunno) but that would be weird since Clem knows we're relying on that file: I also integrated that functionality of the script into official mintinstall and mintbackup (via mint-common).
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
zcot
Level 5
Level 5
Posts: 592
Joined: Wed Oct 19, 2016 6:08 pm

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by zcot » Tue Aug 27, 2019 4:57 pm

I do find the log file too in 19.2, but in Cinnamon, although I can't see where that should matter.

I've been working on a pet project that is for exactly this, and I think it came out of the fact that there's not a very specific tool that does this exactly, or as cleanly as we probably want it to be. Although ending up with some extra deep system packages in the list is not a problem because attempting to install again is "you already have <package>", but I guess it's a psychological issue. :lol: I suppose many of the extra packages end up being from dependencies.

But for example amd64-microcode, or stuff like libxcb-glx0-dev and libreoffice-help-ru- and libresid-builder0c2a- they just make it a feel funny in the end.

And for me, it started by the fact that the Mint Backup tool functionality doesn't catch terminal installs from apt or apt-get, but if we never do apt installs it works perfectly though. So in the end I wanted a way to supplement the Mint Backup tool, and even be able to use the extra list as an import for the tool, although it's easy to do as install.sh or mint.list either way. But it's about not having the weird deep system package stuff, even though we actually installed those by some amount of proxy.

anyway, that's for apt or apt-get installs. It's not fully up to date right now, and it's WIP, but it works pretty well for those of us who are going to be critical about looking at a clean package list :wink: : https://github.com/zcot/list-apt-installs

gm10
Level 20
Level 20
Posts: 10132
Joined: Thu Jun 21, 2018 5:11 pm

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by gm10 » Tue Aug 27, 2019 7:03 pm

zcot wrote:
Tue Aug 27, 2019 4:57 pm
But for example amd64-microcode, or stuff like libxcb-glx0-dev and libreoffice-help-ru- and libresid-builder0c2a- they just make it a feel funny in the end.
Such packages installed as dependencies are not included in the output of the script I gave above.
zcot wrote:
Tue Aug 27, 2019 4:57 pm
And for me, it started by the fact that the Mint Backup tool functionality doesn't catch terminal installs from apt or apt-get,
As I mentioned in the post above yours, it does in 19.2. You're welcome. ;)
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
zcot
Level 5
Level 5
Posts: 592
Joined: Wed Oct 19, 2016 6:08 pm

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by zcot » Tue Aug 27, 2019 9:59 pm

gm10 wrote:
Tue Aug 27, 2019 7:03 pm
zcot wrote:
Tue Aug 27, 2019 4:57 pm
And for me, it started by the fact that the Mint Backup tool functionality doesn't catch terminal installs from apt or apt-get,
As I mentioned in the post above yours, it does in 19.2. You're welcome. ;)
Ah, that's great! I wasn't aware of it yet. Excellent news. Well, and, thank you! ;) Sweet!

gm10 wrote:
Tue Aug 27, 2019 7:03 pm
zcot wrote:
Tue Aug 27, 2019 4:57 pm
But for example amd64-microcode, or stuff like libxcb-glx0-dev and libreoffice-help-ru- and libresid-builder0c2a- they just make it a feel funny in the end.
Such packages installed as dependencies are not included in the output of the script I gave above.
I had tested that script and the modified one from the other thread mentioned above, which was more paired down, albeit in a not particularly logical method(for example it excludes librecad or libretro). But I ended up with a pretty huge list of packages and at first glance it seemed like it might be packages plus dependencies. here's a snippet out of the middle. It's a good example and why I ended up eventually starting to code up something that could include some logic(even though as already mentioned surely these packages are coming out of the necessity of something prior, or something from the initial install.
libvncserver1 libwebkitgtk-dev libwebp-dev libx11-dev libx11-xcb-dev libx32atomic1 libx32gcc1 libx32gomp1 libx32itm1 libx32quadmath0 libx32stdc++6 libxcb1-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-sync-dev libxcb-xfixes0-dev libxkbcommon-dev libxml2-dev libxml2-utils libxnvctrl0 linux-generic linux-headers-4.15.0-38-generic linux-image-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic lolcat lua5.2 mtp-tools oidentd openjdk-11-jre p7zip-full pv python3-distutils python3-lib2to3 python3-urwid screenfetch sessioninstaller skypeforlinux smartmontools splint teamviewer texlive-binaries tickr valac valac-0.40-vapi virtualbox virtualbox-dkms virtualbox-qt weechat-core weechat-curses weechat-lua weechat-perl weechat-plugins weechat-python whois xfce4-goodies xserver-xorg-input-synaptics cabextract- chromium-codecs-ffmpeg-extra- gimp-help-common- liba52-0.7.4- libaribb24-0- libass9- libavresample3- libbasicusageenvironment1- libbs2b0- libcddb2- libdc1394-22- libdca0- libde265-0- libdvbpsi10- libdvdcss2- libdvdnav4- libdvdread4- libfaad2- libflite1- libfluidsynth1- libgroupsock8- libgssdp-1.0-3- libgstreamer-plugins-bad1.0-0- libgupnp-1.0-4- libgupnp-igd-1.0-4- libhal1-flash- libkate1- liblilv-0-0- liblivemedia62- liblua5.2-0- libmatroska6v5- libmicrodns0- libmjpegutils-2.1-0- libmms0- libmodplug1- libmpcdec6- libmpeg2-4- libmpeg2encpp-2.1-0- libmplex2-2.1-0- libnfs11- libnice10- libnorm1- libofa0- libopenal1- libopenal-data- libopencore-amrnb0- libopencore-amrwb0- libopenmpt-modplug1- libpgm-5.2-0- libplacebo4- libpostproc54- libprotobuf-lite10- libqt5x11extras5- libreoffice-help-de- libreoffice-help-en-gb- libreoffice-help-es- libreoffice-help-fr-
Another reason to write up some logic was the idea that I could be using xfce and have a set of 3 or 4 programs and trade off the resulting script to someone on Cinnamon. Or I suppose a friend or myself maybe doing a fresh install on some *buntu setup and be able to transfer the end-result cleanly.

Anyway, it's great that Mint Backup tool has that now. That's perfect!

gm10
Level 20
Level 20
Posts: 10132
Joined: Thu Jun 21, 2018 5:11 pm

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by gm10 » Tue Aug 27, 2019 10:19 pm

zcot wrote:
Tue Aug 27, 2019 9:59 pm
I had tested that script and the modified one from the other thread mentioned above, which was more paired down, albeit in a not particularly logical method(for example it excludes librecad or libretro). But I ended up with a pretty huge list of packages and at first glance it seemed like it might be packages plus dependencies. here's a snippet out of the middle. It's a good example and why I ended up eventually starting to code up something that could include some logic(even though as already mentioned surely these packages are coming out of the necessity of something prior, or something from the initial install.

Code: Select all

libvncserver1 libwebkitgtk-dev libwebp-dev libx11-dev libx11-xcb-dev libx32atomic1 libx32gcc1 libx32gomp1 libx32itm1 libx32quadmath0 libx32stdc++6 libxcb1-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-sync-dev libxcb-xfixes0-dev libxkbcommon-dev libxml2-dev libxml2-utils libxnvctrl0 linux-generic linux-headers-4.15.0-38-generic linux-image-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic lolcat lua5.2 mtp-tools oidentd openjdk-11-jre p7zip-full pv python3-distutils python3-lib2to3 python3-urwid screenfetch sessioninstaller skypeforlinux smartmontools splint teamviewer texlive-binaries tickr valac valac-0.40-vapi virtualbox virtualbox-dkms virtualbox-qt weechat-core weechat-curses weechat-lua weechat-perl weechat-plugins weechat-python whois xfce4-goodies xserver-xorg-input-synaptics cabextract- chromium-codecs-ffmpeg-extra- gimp-help-common- liba52-0.7.4- libaribb24-0- libass9- libavresample3- libbasicusageenvironment1- libbs2b0- libcddb2- libdc1394-22- libdca0- libde265-0- libdvbpsi10- libdvdcss2- libdvdnav4- libdvdread4- libfaad2- libflite1- libfluidsynth1- libgroupsock8- libgssdp-1.0-3- libgstreamer-plugins-bad1.0-0- libgupnp-1.0-4- libgupnp-igd-1.0-4- libhal1-flash- libkate1- liblilv-0-0- liblivemedia62- liblua5.2-0- libmatroska6v5- libmicrodns0- libmjpegutils-2.1-0- libmms0- libmodplug1- libmpcdec6- libmpeg2-4- libmpeg2encpp-2.1-0- libmplex2-2.1-0- libnfs11- libnice10- libnorm1- libofa0- libopenal1- libopenal-data- libopencore-amrnb0- libopencore-amrwb0- libopenmpt-modplug1- libpgm-5.2-0- libplacebo4- libpostproc54- libprotobuf-lite10- libqt5x11extras5- libreoffice-help-de- libreoffice-help-en-gb- libreoffice-help-es- libreoffice-help-fr- 
Something you may not have realized there, my script also removes packages that you have removed. Those will indeed be listed individually, there's no (good) way around that. Most of those packages in your example there have a trailing -, indicating that they will be removed. ;)
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
zcot
Level 5
Level 5
Posts: 592
Joined: Wed Oct 19, 2016 6:08 pm

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by zcot » Tue Aug 27, 2019 10:54 pm

gm10 wrote:
Tue Aug 27, 2019 10:19 pm
zcot wrote:
Tue Aug 27, 2019 9:59 pm
I had tested that script and the modified one from the other thread mentioned above, which was more paired down, albeit in a not particularly logical method(for example it excludes librecad or libretro). But I ended up with a pretty huge list of packages and at first glance it seemed like it might be packages plus dependencies. here's a snippet out of the middle. It's a good example and why I ended up eventually starting to code up something that could include some logic(even though as already mentioned surely these packages are coming out of the necessity of something prior, or something from the initial install.

Code: Select all

libvncserver1 libwebkitgtk-dev libwebp-dev libx11-dev libx11-xcb-dev libx32atomic1 libx32gcc1 libx32gomp1 libx32itm1 libx32quadmath0 libx32stdc++6 libxcb1-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-sync-dev libxcb-xfixes0-dev libxkbcommon-dev libxml2-dev libxml2-utils libxnvctrl0 linux-generic linux-headers-4.15.0-38-generic linux-image-4.15.0-38-generic linux-modules-extra-4.15.0-38-generic lolcat lua5.2 mtp-tools oidentd openjdk-11-jre p7zip-full pv python3-distutils python3-lib2to3 python3-urwid screenfetch sessioninstaller skypeforlinux smartmontools splint teamviewer texlive-binaries tickr valac valac-0.40-vapi virtualbox virtualbox-dkms virtualbox-qt weechat-core weechat-curses weechat-lua weechat-perl weechat-plugins weechat-python whois xfce4-goodies xserver-xorg-input-synaptics cabextract- chromium-codecs-ffmpeg-extra- gimp-help-common- liba52-0.7.4- libaribb24-0- libass9- libavresample3- libbasicusageenvironment1- libbs2b0- libcddb2- libdc1394-22- libdca0- libde265-0- libdvbpsi10- libdvdcss2- libdvdnav4- libdvdread4- libfaad2- libflite1- libfluidsynth1- libgroupsock8- libgssdp-1.0-3- libgstreamer-plugins-bad1.0-0- libgupnp-1.0-4- libgupnp-igd-1.0-4- libhal1-flash- libkate1- liblilv-0-0- liblivemedia62- liblua5.2-0- libmatroska6v5- libmicrodns0- libmjpegutils-2.1-0- libmms0- libmodplug1- libmpcdec6- libmpeg2-4- libmpeg2encpp-2.1-0- libmplex2-2.1-0- libnfs11- libnice10- libnorm1- libofa0- libopenal1- libopenal-data- libopencore-amrnb0- libopencore-amrwb0- libopenmpt-modplug1- libpgm-5.2-0- libplacebo4- libpostproc54- libprotobuf-lite10- libqt5x11extras5- libreoffice-help-de- libreoffice-help-en-gb- libreoffice-help-es- libreoffice-help-fr- 
Something you may not have realized there, my script also removes packages that you have removed. Those will indeed be listed individually, there's no (good) way around that. Most of those packages in your example there have a trailing -, indicating that they will be removed. ;)
Ah! I understand. I wasn't realizing that. I ended up encountering that concept too with that program by just logic-parsing the install logs since at first it was still listing packages that were also subsequently used in a remove or purge command. That's a cool script though, no doubt. And to be able to get the info pretty directly in a one-line is nice.

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: SOLVED :- 19.2 Mate:- can i export list of installed applications?

Post by TI58C » Sat Aug 31, 2019 8:08 pm

zcot wrote:
Tue Aug 27, 2019 9:59 pm
-----
I had tested that script and the modified one from the other thread mentioned above, which was more paired down, albeit in a not particularly logical method(for example it excludes librecad or libretro). But I ended up with a pretty huge list of packages and at first glance it seemed like it might be packages plus dependencies. here's a snippet out of the middle. It's a good example and why I ended up eventually starting to code up something that could include some logic(even though as already mentioned surely these packages are coming out of the necessity of something prior, or something from the initial install.
-----
Thanks for pointing out that I was a bit heavy-handed in filtering and so deleted the packages you mentioned. It is the first feedback ever on this one-liner.

Somehow, the list of packages marked "manual" contains packages that were not truly manually installed, but are packages the system thinks are important (to protect for instance against apt-get autoremove). Did filtering by mark1-eyeball manually at first, but wanted to automate it.

As to being methodical: on my sample of only three systems with only minor difference in installed packages (alas, none including librecad or libretro), the awk regex-filters were enough to filter out all the unwanted stuff, while still leaving all wanted packages for reinstall. I call that methodical within the constraint of the available data. But the world is bigger and the data noisier than I imagined....

Well, if as gm10 said, the mint backup tool now also gets the apt-get installs, the issue is more or less moot now. Still, learned a lot from the thread mentioned earlier and working on this little script.

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

Post Reply

Return to “Newbie Questions”