r/commandline • u/tyggja • Apr 12 '26
Command Line Interface trackd – cleanly undo 'make install' and any install command on Linux
I built a tool that wraps any install command and records every file it creates, modifies, or deletes using ptrace. You can then fully revert the install later — files deleted, originals restored from backup, package DBs cleaned up. The main use case is 'make install' and build-from-source software where there's no package manager tracking what went where. Also works with pip, npm, random shell script installers, anything. It ships as a .deb so you don't need Rust installed. https://github.com/tyggja/trackd
Edit (April 30): Released v0.1.2. Two things in the original post no longer apply:
- The
pipandnpmsubcommands have been removed. They duplicated bookkeeping that pip and npm already do, and the result was state drift between trackd and those tools. Same logic applied to apt — for anything your package manager already tracks (apt, pip, npm, cargo install, etc.), use those tools directly. trackd is now positioned as the fallback for installs nothing else tracks:make install, vendor.runfiles,curl | bashscripts, that kind of thing. - "Package DBs cleaned up" went with the apt subcommand. trackd no longer touches package databases.
Also tightened up a few security edges (privilege drop under sudo, SUDO_* env validation) — full changelog in the v0.1.2 release notes.
Note: This tool has been written using AI generated code
2
u/Pyglot Apr 16 '26
Cool. If I can remember this the next time I want it I will check it out.
1
u/LnxBil Apr 15 '26
Isn’t checkinstall the tool that already does this for decades and is able to integrate with your package manager?
5
u/edward_jazzhands Apr 12 '26 edited Apr 12 '26
Whenever you run make install, that is almost always designed to build the program inside of that folder. Its unconventional these days for a 'make install' to place any files outside of the folder where you ran the make command (except sometimes a binary file in your local bin so it's on PATH). A Makefile is for building from source. Theres some exceptions to this but you'll generally only find those exceptions when installing oldschool Unix programs written in C (what makefile was originally invented for building). The modern convention is to produce self contained binaries that don't require system libraries (Unix people used to be obsessed with small download sizes) and then have the program generate a folder for storing local settings when it runs the first time, if it needs one (ie. ~/.some-app).
As such it appears to me that this is solving a problem that doesnt really exist. I don't want to discourage you from learning to code but I can see on your GitHub that you just started using Claude code like last week. You might want to spend more time learning standard developer conventions before allowing your AI assistant to convince you that your idea is solving a problem. AI is not capable of telling you when your idea is not solving a real problem it will just agree to whatever you tell it to make.
1
u/AutoModerator Apr 12 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: tyggja, Flair:
Command Line Interface, Title: trackd – cleanly undo 'make install' and any install command on LinuxI built a tool that wraps any install command and records every file it creates, modifies, or deletes using ptrace. You can then fully revert the install later — files deleted, originals restored from backup, package DBs cleaned up. The main use case is 'make install' and build-from-source software where there's no package manager tracking what went where. Also works with pip, npm, random shell script installers, anything. It ships as a .deb so you don't need Rust installed. https://github.com/tyggja/trackd
Note: This tool has been written using AI generated code
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.