Cleanly uninstall anything — even if it didn't come from a package manager.
trackd wraps any install command and records every file it creates, modifies, or deletes. When you want to undo it, trackd reverts everything: files are deleted, originals are restored from backup, renames are undone, and package databases are cleaned up automatically.
Works with apt, pip, npm, make install, curl-pipe-bash scripts — anything that touches the filesystem.
trackd install myapp -- make install # track it
trackd remove myapp # undo it, completelyYou compiled something from source and ran make install. Now you want it gone. There's no make uninstall. You have no idea what files it put where. You're stuck.
Or you ran someone's install.sh from GitHub. Or pip installed something globally and it scattered files across your system. Or you want to try some software without committing to it.
trackd solves this. It watches what the installer does, backs up anything it's about to modify or delete, and gives you a clean undo button.
Download the latest .deb from Releases:
sudo dpkg -i trackd_0.1.0_amd64.debThis installs the binary, sets up state directories, creates a default config, and takes the initial baseline snapshot.
git clone https://github.com/tyggja/trackd.git
cd trackd
cargo build --release
sudo ./install.shRequires Rust and a Linux x86_64 system.
git clone https://github.com/tyggja/trackd.git
cd trackd
./build-deb.sh
sudo dpkg -i trackd_0.1.0_amd64.debRequires Rust and dpkg-deb (pre-installed on Debian/Ubuntu).
# Track a make install
trackd install myapp -- make install
# Track an apt package
trackd apt install cowsay
# Track a pip package
trackd pip install flask
# Track a shell script installer
trackd install dotfiles -- bash setup.sh
# See what a session changed
trackd show myapp --changes
# Preview what undo would do
trackd remove myapp --dry-run
# Actually undo it
trackd remove myapp --yes| Command | What it does |
|---|---|
trackd install <n> -- <cmd> |
Run a command and track its filesystem changes |
trackd apt install <pkgs> |
Track an apt-get install |
trackd pip install <pkgs> |
Track a pip install |
trackd npm install <pkgs> |
Track an npm install |
trackd remove <n> |
Revert a tracked session |
trackd remove <n> --dry-run |
Preview what revert would do |
trackd list |
List tracked sessions |
trackd show <n> --changes |
Show what a session changed |
trackd status |
Show snapshot and session info |
trackd snapshot |
Retake baseline snapshot |
trackd dbremove <n> |
Drop a session from the DB without reverting |
trackd uses Linux ptrace to intercept filesystem-mutating syscalls (openat, unlinkat, renameat, etc.) before they execute. When a file is about to be modified or deleted, trackd copies it to a backup directory first. After the command finishes, all touched paths are classified against a baseline filesystem snapshot and recorded in a SQLite database.
On revert, trackd undoes everything in the correct order: renames are reversed, modified files are restored from backup, created files are deleted (deepest first), and for apt packages the dpkg database is cleaned up automatically.
make installand build-from-source software. trackd's core use case. No package manager tracks these files — trackd does.- Random install scripts.
curl | bashinstallers,setup.shfrom GitHub repos, anything where you don't know what it'll touch. - Trying out software. Install it through trackd, evaluate it, revert if you don't want it. No leftovers.
- Auditing.
trackd show <n> --changesgives a complete manifest of every file an installer touched.
- Docker/containers — use container layers instead.
- System packages you plan to keep — just use apt normally.
- Snap/Flatpak — they have their own sandboxing and rollback.
Edit /etc/trackd/config.toml:
# Extra paths to skip during snapshot
# skip_paths = ["/data/scratch"]
# Extra filesystem types to skip
# skip_fstypes = ["virtiofs"]
# Paths to remove from the built-in skip list
# force_include_paths = ["/var/cache"]
# Max file size for backup in MB (default 100)
# max_backup_size_mb = 100
# Max changes per session (default 100000)
# max_session_changes = 100000
# Max total backup size per session in MB (default 1000)
# max_total_backup_size_mb = 1000| Path | Purpose |
|---|---|
/usr/local/bin/trackd |
Binary (setuid root) |
/etc/trackd/config.toml |
Configuration |
/var/lib/trackd/trackd.db |
SQLite database |
/var/lib/trackd/backups/ |
Pre-modification file backups |
trackd runs as a setuid root binary — it needs root to ptrace child processes and to back up/restore files across the entire filesystem. The security model:
- The traced command runs as your user (privileges are dropped before exec), except for
trackd apt installwhich runs apt-get as root directly. - Backup directories are verified to be root-owned and not group/world-writable before any file is written or restored.
- Session names, package names, and paths are validated to prevent injection.
- Backup files are owned by root and have setuid/setgid bits stripped.
- The config file is ignored if it's not root-owned or is world-writable.
trackd is an audit and revert tool, not a security sandbox. Specifically:
- Tracing relies on ptrace. A multi-threaded install process can rewrite
the syscall-argument buffer between trackd's read and the kernel's read,
causing trackd to record the wrong path while the kernel acts on the
attacker-chosen one. Single-threaded installers (apt, dpkg, pip, npm)
are not affected in practice, but a deliberately hostile multi-threaded
command inside
trackd installcan produce an incomplete change log. - ptrace cannot follow setuid execs (the kernel marks them non-dumpable).
Commands invoked through
sudoinsidetrackd installare not traced past the sudo boundary; usetrackd apt installfor package manager operations. - The revert path trusts the baseline metadata trackd itself captured. A baseline taken on a compromised system will faithfully restore the compromised state.
If you need integrity guarantees against a hostile install command, run it inside a container/VM and use trackd inside that boundary.
- Linux x86_64 only. ptrace syscall interception is architecture-specific.
- Files over 100MB are not backed up (configurable). Metadata is still recorded.
- ~10–20% overhead on traced commands from ptrace interception.
- Cannot trace through setuid binaries like sudo. Use
trackd apt installinstead oftrackd install foo -- sudo apt-get install foo.
MIT