Generating list of programs installed - how?
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 4
- Posts: 406
- Joined: Sat Mar 28, 2020 7:19 am
- Location: Plymouth, UK
Generating list of programs installed - how?
Just received a message telling me that Mint 19.3 soon won't be supported and I need to replace with 21.1.
I know how to set up a live Mint USB, how to install onto my laptop from that, and I maintain a separate backup of all my files.
I've been keeping a list on paper of the programs I've installed while using Mint 19.3---all of them via Software Manager, and used without modification---but, as a check, is there a simple way to generate a neat list of the programs that I installed?
I know how to set up a live Mint USB, how to install onto my laptop from that, and I maintain a separate backup of all my files.
I've been keeping a list on paper of the programs I've installed while using Mint 19.3---all of them via Software Manager, and used without modification---but, as a check, is there a simple way to generate a neat list of the programs that I installed?
Last edited by LockBot on Wed Jul 26, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 21.2 Cinnamon. 15.6 GiB. 1001.3 GB. Lenovo Thinkpad.
Re: Generating list of programs installed - how?
Software Manager has that option but it's graphical:
There is this, but it shows all the packages, not just programs:
I'd recommend keeping that list in a text file from now on, instead of paper.
Not sure how that can be piped into a text file in list form.There is this, but it shows all the packages, not just programs:
Code: Select all
apt list --installed > packages.txt
Re: Generating list of programs installed - how?
This is probably the best list:
Other options to get a list of installed programs:
This one produces almost the same list as the command above:
or
or
This is not a complete listing. I.e. QGIS and Skype are not listed.
This lists programs that are running right now:
Code: Select all
dpkg --get-selections > ~/Documents/installed-softwareMint.list
This one produces almost the same list as the command above:
Code: Select all
find /usr/share/applications -maxdepth 1 -type f -exec basename {} .desktop \; | sort > ~/Desktop/applications.txt
Code: Select all
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
Code: Select all
dpkg-query -l [This is a very long list - output to file " > dpkg.txt"]
Code: Select all
ls /usr/share/applications | awk -F '.desktop' ' { print $1}' - > ~/Desktop/applications.txt
Code: Select all
wmctrl -lx
Re: Generating list of programs installed - how?
First off, you don't have to go to 21.1(EOL is April 2027), you can go up to any of the Mint 20.x versions, they are still supported until April 2025.
I find the Backup Tool listing is quite good after years through the versions. It used to not show ppa software, or manually installed from terminal, but it does now. I don't know how much of that is backported for older versions, possibly all the good parts though, but at least it works nicely on 20.x and above.
Check out that Backup Tool in the main menu, get the Software Selection, and it will make the text file in your home directory under
For me comparing that list with the com 23 line mentioned above, it's nearly exact, except that the com 23 line is also showing some additional packages from the dependencies of the others in the list, -but the theory is that if you install the 1 program again, it will still pull those dependencies automatically anyway(although it depends on the difference of the apt configuration with --install-recommends --install-suggests, but then Mint 20 and 21 do have install-recommends as default).
I find the Backup Tool listing is quite good after years through the versions. It used to not show ppa software, or manually installed from terminal, but it does now. I don't know how much of that is backported for older versions, possibly all the good parts though, but at least it works nicely on 20.x and above.
Check out that Backup Tool in the main menu, get the Software Selection, and it will make the text file in your home directory under
~/Documents/Backups/
and you could also bring that file to the new install, same path location and it will automate that list of installs(it will not go get ppa sources and add those but if you readd the sources it will be able to pull the software).For me comparing that list with the com 23 line mentioned above, it's nearly exact, except that the com 23 line is also showing some additional packages from the dependencies of the others in the list, -but the theory is that if you install the 1 program again, it will still pull those dependencies automatically anyway(although it depends on the difference of the apt configuration with --install-recommends --install-suggests, but then Mint 20 and 21 do have install-recommends as default).
Re: Generating list of programs installed - how?
I have the same problem, but I don't have a list of things I installed on paper. I tried the suggested approaches, but they generate over 2500 lines in their listings. So can I suggest a modification of the question: what programs have I installed, which are NOT part of the default Mint installation of 19.3? Note emphasis on "I".
I first hit this issue when I was trying to figure out what to back up. I knew I had to back up Documents, Desktop, Music and so on. Then I discovered that I had a Calibre directory, and I started wondering what else I had to worry about that wasn't in the usual places that Mint creates for you. Now I'm wondering about what happens when I try to upgrade to the next version of Mint. Do I have to worry about the version of Calibre, so that when I upgrade and install a new version of it, does it still work with my old directory?
I first hit this issue when I was trying to figure out what to back up. I knew I had to back up Documents, Desktop, Music and so on. Then I discovered that I had a Calibre directory, and I started wondering what else I had to worry about that wasn't in the usual places that Mint creates for you. Now I'm wondering about what happens when I try to upgrade to the next version of Mint. Do I have to worry about the version of Calibre, so that when I upgrade and install a new version of it, does it still work with my old directory?
Re: Generating list of programs installed - how?
The backup tool @zcot mentions does not produce any 2500 lines.
As for a command, this one, (a modified version of one from above) eliminates all the lib* packages, so shortens the list considerably.
Code: Select all
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) | grep -Ev ^lib
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
-
- Level 4
- Posts: 406
- Joined: Sat Mar 28, 2020 7:19 am
- Location: Plymouth, UK
Re: Generating list of programs installed - how?
That I find really useful. It showed three files that the other versions referred to below failed to pick up. But, as was pointed out, there's seems to be no possibility of getting a list to output. However, a solution to that problem a bit further on below**.
Why might one not want to go all the way to 21.1, and install a 20.x instead?
Yes, also very useful, and I found the same comparing with the com 23 line. **Also, since it gives a list for output, one can add by hand the additional things picked up by Software Manager> Show Installed Applications.zcot wrote: ⤴Thu Jan 26, 2023 12:58 pm I find the Backup Tool listing is quite good after years through the versions. [...] Check out that Backup Tool in the main menu, get the Software Selection, and it will make the text file in your home directory under~/Documents/Backups/
and you could also bring that file to the new install, same path location and it will automate that list of installs(it will not go get ppa sources and add those but if you readd the sources it will be able to pull the software).
For me comparing that list with the com 23 line mentioned above, it's nearly exact, except that the com 23 line is also showing some additional packages from the dependencies of the others in the list, -but the theory is that if you install the 1 program again, it will still pull those dependencies automatically anyway(although it depends on the difference of the apt configuration with --install-recommends --install-suggests, but then Mint 20 and 21 do have install-recommends as default).
I hadn't noticed that till you pointed it out. I think, though I'm no expert but have used Calibre quite a bit, that as long as one has stored one's created files somewhere safe, it won't matter if that directory disappears on reinstalling Mint. But perhaps you use Calibre in quite a different way from me, so don't rely on what I say!
Linux Mint 21.2 Cinnamon. 15.6 GiB. 1001.3 GB. Lenovo Thinkpad.
Re: Generating list of programs installed - how?
There could be a lot of reasons, but basically it often boils down to 20.x working better than 21.1.Why might one not want to go all the way to 21.1, and install a 20.x instead?
-
- Level 4
- Posts: 406
- Joined: Sat Mar 28, 2020 7:19 am
- Location: Plymouth, UK
Re: Generating list of programs installed - how?
That's an excellent reason not to! I'll take your advice. Thank you.
Linux Mint 21.2 Cinnamon. 15.6 GiB. 1001.3 GB. Lenovo Thinkpad.
Re: Generating list of programs installed - how?
Maybe it's useful?
Code: Select all
#!/bin/bash
########################################################################
# #
# Small script that lists all installed packages. Double click on #
# a package shows package info and a link to the package homepage. #
# "Save to file" saves the list to text file without the lib packages #
# Only tested on Mint 19 & 20. #
# Depends on: apt, dpkg, yad and an internet browser #
# #
# Made by Koentje (lowrida007@gmail.com #
# version 1.4 #
########################################################################
arch=`dpkg --print-architecture`
# Open homepage url of package in browser
function open_file {
xdg-open "$url"
}
export -f open_file
# Open package informationn dialog
function info_dialog () {
$HOME/bin/mousepointer hourglass
tmpfile="/tmp/yad-show-package.tmp"
dialog_width="1150"
dialog_height="570"
dialog_font="Ubuntu Mono 13"
apt-cache show "$2" > "$tmpfile"
export url=$(cat "$tmpfile" | grep "Homepage:" | head -n1 | awk '{print $2}')
export package=$(cat "$tmpfile" | grep "Package: " | awk '{print $2}')
if ! [ "$url" = "" ]; then buttonhomepage="--button=Website:bash -c open_file"; fi
$HOME/bin/mousepointer default
cat $tmpfile | yad --text-info --margins=6 --back=#181818\
--title=" Package info: $package "\
--center --fixed --wrap\
--tail --always-print-result\
--fontname="$dialog_font"\
--text-align=left\
--width="$dialog_width" --height="$dialog_height"\
--buttons-layout=spread\
--button="OK" \
"$buttonhomepage"
}
export -f info_dialog
# Open main form with all installed packages
function main () {
main_width="1900"
main_height="800"
export input
input=$(dpkg -l | sort -fbn | tail -n +4 | grep -F "ii" | awk -F" " '{ printf $1"\n" $2"\n" $3"\n" $4"\n"; $1=$2=$3=$4=""; printf substr($0,5)"\n" }' | tr "'" " " | yad --list\
--width="$main_width" --height="$main_height"\
--title=" Show installed packages - ($arch) "\
--separator=' '\
--window-icon=utilities-system-monitor\
--center --vscoll-policy=always\
--window-icon=application\
--text-align=left\
--button="Safe2File"!gtk-execute!" Save list to file (without lib packages) ":200\
--button="gtk-close"!gtk-close!" Bye.. ":202\
--buttons-layout=spread\
--dclick-action="bash -c 'info_dialog %s'"\
--add-preview\
--column-width=10 --grid-lines=both --expand-column=100 --no-markup\
--column="Inst:TEXT"\
--column="Package name:TEXT"\
--column="Version number:TEXT"\
--column="Platform:TEXT"\
--column="Short description:TEXT") #"
case $? in
200) # Cancel
echo "Save package list to $HOME/installed-software.txt"
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) | grep -Ev ^lib > "$HOME/installed-software.txt"
xdg-open "$HOME/installed-software.txt"
main
;;
202) # Cancel
echo "Program halted."
exit
;;
252) # Escape exit
echo "Escaped."
exit
;;
*)
echo "Exit nr: $1"
;;
esac
}
main