How do you containerize stuff you install from source in a way that you can completely remove later?

j4k3@lemmy.world to Linux@lemmy.ml – 43 points –

I'm doing a bunch of AI stuff that needs compiling to try various unrelated apps. I'm making a mess of config files and extras. I've been using distrobox and conda. How could I do this better? Chroot? Different user logins for extra home directories? Groups? Most of the packages need access to CUDA and localhost. I would like to keep them out of my main home directory.

46

You are viewing a single comment

OP could use flakes to create these dev environments and clean them up without a trace once done.

Any files created by programs running in the dev environments will remain.

nix-collect-garbage

Does NOT delete any files that were written to, for example, ~/.local or ~/.config from dev shell.

One of OP's problems was,

I’m making a mess of config files and extras.