Migration shouldn't feel like digital archaeology.
Most tools just dump a list of 2,000+ packages, leaving you to sift through the noise of automatic dependencies and library bloat. This project takes a different approach: it finds the "Peaks."
Mathematically speaking, this tool identifies the Minimum Spanning Set of your system's software. Instead of a flat list, it calculates the smallest possible collection of manually installed packages required to reconstruct your entire dependency tree.
- Leaf-to-Root Traversal: To handle the "Recommends" field and those pesky circular references, the tracker crawls the dependency graph starting from the leaves. This ensures that even complex, self-referencing loops are captured without missing a beat.
- Alternative Dependencies: The tool acknowledges that modern package management isn't always linear; it highlights potential alternatives, giving you full control over your system's reconstruction.
- Hermetic Rescue: Designed to work even when your OS has "given up." If your local Python is ancient or broken, the included setup script spins up a standalone, portable Python 3.12 environment.
- Smart Snapshots: Capture "Peak Packages" on the old system, baseline your new system, and surgically install only the differences.
- ExFAT-Friendly Execution: Since non-Linux filesystems don't support execution bits or symlinks, the tool automatically unpacks its runtime into
/tmp(RAM-disk) to bypass mount restrictions.
- Old System: Load the portable Python and capture a snapshot of your peak packages.
- Home Migration: Archive and move your actual home directory data using the provided scripts.
- New System: Restore your home directory, create a fresh baseline, and sync your missing "Peaks" via
apt-get.
- Remove any old snapshot with the same name to avoid stale comparisons.
rm ~/package_snapshots/prev_install.txt- If the old system Python is older than 3.10, load the portable Python environment.
source ./setup_python.sh- Capture a snapshot of the current manually installed peak packages.
python3 pkg_tracker.py --create prev_system
# Example output:
# Saved successfully: 365 packages recorded (/home/user/package_snapshots/prev_system.txt).- Archive and migrate your home directory data.
/bin/bash migrate_home.sh /home/user- Restore the previously created backup archive.
sudo /bin/bash restore_home.sh backup_taxy_20260419_100000.tar.gz- Install pkg-tracker on the new machine.
/bin/bash install_pkg_tracker.sh- Keep the old base snapshot as
prev_installfor base filtering.
mv ~/package_snapshots/base_install.txt ~/package_snapshots/prev_install.txt- Create a fresh baseline snapshot on the new system.
pkg-tracker --create base_install- Compare the previous snapshot against current state while ignoring base packages.
pkg-tracker --base prev_install prev_systemOr do a quick compare against a named snapshot:
pkg-tracker prev_system- Install missing packages that were present in
prev_system.
sudo apt-get install $(pkg-tracker --base prev_install prev_system --pipe-output-set removed)- Restore the fresh-install package state.
sudo apt-get autoremove $(pkg-tracker base_install --pipe-output-set new)Clone the repository and enter it:
gh repo clone taxy/debian_based_home_migrate
cd debian_based_home_migrateInstall as a normal end-user tool:
python3 -m pipx install .Or for development (editable install):
python3 -m pipx install -e .Enable shell tab-completion for pkg-tracker in bash:
echo 'eval "$(register-python-argcomplete pkg-tracker)"' >> ~/.bashrcReload shell config in the current terminal:
source ~/.bashrcAfter installation, the environment exposes this command:
pkg-tracker --help