r/linuxmint • • Oct 31 '26

Anything that can help with inventory of everything I've installed and tweaked?

I've been using mint for a few years now, and I'm intent on doing a clean install. I haven't kept track of things I've installed via apt, flatpak, appimages, or modified in udev rules, apt sources, modprobe, things like that.

Is there a way I could get a few rough lists of my own changes. I don't actually want to automate their installation, just produce a list is enough of a reference.

8 Upvotes

8 comments sorted by

3

u/WeAreAlreadyCyborgs Linux Mint 22.3 Zena | Cinnamon Oct 31 '26

For apt packages

dpkg -l > packages.txt

Flatpak

flatpak list > flatpak.txt

1

u/iamapizza Nov 01 '26

The dpkg -l gives thousands of entries since it's a combination of system packages as well as things I installed. I was hoping to get a list of just the things I had installed.

But looking at other comments, it seems like it's more of a "something to start tracking next time" rather than something I can get right away.

The flatpak one does help though, the list is tiny.

1

u/ScouringtheUniverse Linux Tech Oct 31 '26

1

u/iamapizza Nov 01 '26

Thanks, this seems to grab a list of everything installed currently rather than the things I installed myself. But if nothing else comes up, I'll at least start using this next time to start tracking.

2

u/Linuxmonger Oct 31 '26

Next time around, immediately after install, before you do anything else, run the following;

##  These three packages are the first thing I always install;
sudo apt install tig git etckeeper
sudo apt update
sudo apt upgrade -y
sudo reboot

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

See 'man gittutorial' to get started, then see 'man giteveryday' for a useful minimum set of commands.

Etckeeper manages /etc be storing in a git, mercurial, bazaar, or darcs repository. By default each of the commands operates on /etc, but a different directory can be speci‐fied to operate on a clone of the /etc repository located elsewhere.

Tig is an ncurses-based text-mode interface for git. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.

On Debian based distros, etckeeper makes an initial commit on install, and ties into apt/apt-get/dpkg to make an automatic snapshot before any software install or removal.

Below is tig, started in the /etc/ directory with the 2027-06-27 11:49 change highlighted (highlights and color don't show here, but a picture of this is https://imgur.com/a/YHlIz3m

This was recorded before running 'sudo apt update' by apt, it didn't need any other effort on my part. It shows exactly what changes happened in the /etc/ folder beforehand, that being that I added a core to a VM called "sysadmin_test".

It lets you see what happens, when, and helps you fix things if they get broken.

2026-07-16 18:20 -0400 steve    o [master] committing changes in /etc made by "
2026-07-16 18:16 -0400 root     o committing changes in /etc made by "/usr/libe
2026-07-16 18:16 -0400 root     o committing changes in /etc made by "/usr/libe
2026-06-27 11:49 -0400 steve    o saving uncommitted changes in /etc prior to a
2026-06-26 15:30 -0400 steve    o committing changes in /etc made by "/usr/bin/
2026-06-26 13:59 -0400 steve    o saving uncommitted changes in /etc prior to a
2026-06-16 16:09 -0400 steve    o committing changes in /etc made by "apt-get u
2026-06-10 12:44 -0400 root     o committing changes in /etc made by "/usr/bin/
2026-06-09 16:17 -0400 steve    o committing changes in /etc made by "apt-get u
2026-06-04 10:49 -0400 steve    o committing changes in /etc made by "apt-get u
2026-06-04 10:49 -0400 steve    o saving uncommitted changes in /etc prior to a
2026-06-04 07:37 -0400 root     o daily autocommit
2026-06-02 18:09 -0400 root     o daily autocommit
[main] c4f9a07cdeb6d5efeddaf03477084f5aae19cd1c - commit 4 of 65            20%
commit c4f9a07cdeb6d5efeddaf03477084f5aae19cd1c
Author:     steve <steve@Nuc>
AuthorDate: Sat Jun 27 11:49:20 2026 -0400
Commit:     root <root@Nuc>
CommitDate: Sat Jun 27 11:49:20 2026 -0400
    saving uncommitted changes in /etc prior to apt run
---
 libvirt/qemu/sysadmin_test.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt/qemu/sysadmin_test.xml b/libvirt/qemu/sysadmin_test.xml
index cbcc1b6..9db4e64 100644
--- a/libvirt/qemu/sysadmin_test.xml
+++ b/libvirt/qemu/sysadmin_test.xml
@@ -15,7 +15,7 @@ or other application using the libvirt API.
   </metadata>
   <memory unit='KiB'>4194304</memory>
   <currentMemory unit='KiB'>4194304</currentMemory>
  • <vcpu placement='static'>4</vcpu>
+ <vcpu placement='static'>5</vcpu> <os> <type arch='x86_64' machine='pc-q35-noble'>hvm</type> <boot dev='hd'/> [diff] c4f9a07cdeb6d5efeddaf03477084f5aae19cd1c - line 1 of 24 100%

2

u/Friendly_Brick752 29d ago

Main Menu > Backup Tool has an option to store a list of "installed" software, which you can take to a new box

1

u/Standard_Tank6703 LMDE7, 12 yr LM experience, "No obligation to enjoy" 29d ago

There is no "one size fits all" answer to this, which is why many of us just make a bash script of what we actually DID do.

It starts off as a simple text log, some copied and pasted and some hand-entered - as you are essentially asking for. You "did" keep notes of everything, right? If not, then don't blow away your working HDD/SSD. Take it out of your machine and set it off to the side. Don't overwrite it. When you have an issue, you can retrace your steps on the old load. And document it this time in your text log.

Then the rest is just an adaptation of that into a bash script. Since most of it speaks for itself, it remains a log - a "living" document.

1

u/the-last-user 28d ago

In the past I used a utility called aptik to do parts of this, however it appears to have become unmaintained. For apt packages I used dpkg --get-selections > packages.txt on the old OS, ran it again on the clean install outputting to cleanpackages.txt, then used both files to get a list of only the packages that had been manually installed (or pulled in as dependencies) on the old OS: cat packagelist.txt cleanpackagelist.txt | sort | uniq -u > uniquepackges.txt As long as you are using the exact same OS version and architecture uniquepackages.txt should be pretty good, but you will of course want to manually review it (otherwise what is the point of a clean OS install). Once you are satisfied with the list of packages and have all your repos configured, you can run a script like this to semi-automatically reinstall your debs on the clean OS install:

#!/bin/bash
while read -u 10 p; do
  echo "$p" >> todo.txt
  while true; do
    echo -e "\n\nNext: $p"
    read -p "Do you wish to continue?" yn
    case $yn in
      [Yy]* ) apt-get install $p;break;;
      [Nn]* ) exit;;
      * ) echo "Please answer yes or no.";;
    esac
  done
  echo "$p" >> done.txt
done 10<uniquepackages-manually.weeded.txt

This lets you see any errors and deal with them before proceeding (unlike a fully automatic process).

If you reinstall to a different drive you can also mount the old one and do file compares (such as everything under /etc/) to look for different/missing files. I may have used Meld for this, but it has been a while.