Distrobox question

tinfoil-hat

Well-Known Member
Joined
Oct 24, 2021
Messages
698
Reaction score
423
Credits
4,776
Hi, lets say I install Distrobox. And inside that Distrobox I install some AI Agents via curl that require a ton of npm packages. Are all npm Packages and changes to the OS deleted, if I delete the Distrobox?
 


That sounds like a perfect scenario for taking a Timeshift snapshot prior to installing, to me
 
Hi, lets say I install Distrobox. And inside that Distrobox I install some AI Agents via curl that require a ton of npm packages. Are all npm Packages and changes to the OS deleted, if I delete the Distrobox?
Yes and no.
  • If you install npm and their packages "global", with sudo in the distrobox, that would target a target directory such as "/usr/", yes. That goes in a volume attached to the container that will get disposed when you delete the container.
  • If you install npm and their packages in the user directory, no. Distrobox will use your user directory on the host's filesystem: it doesn't use a separate volume for the user files, unless you specify the creation of a separate volume for your home directory.
See:
 
Yes and no.
  • If you install npm and their packages "global", with sudo in the distrobox, that would target a target directory such as "/usr/", yes. That goes in a volume attached to the container that will get disposed when you delete the container.
  • If you install npm and their packages in the user directory, no. Distrobox will use your user directory on the host's filesystem: it doesn't use a separate volume for the user files, unless you specify the creation of a separate volume for your home directory.
See:
so to simplify it:
everything in a distrobox / get's deleted together with the distrobox and /home will persist when distrobox is deleted?
 
Yes. More precisely, your compouter's /home/tinfoil-hat is mounted in the distrobox. If you screw your home user files in the distrobox, they are gone for good.

Also, if you don't like that, you can specify for the ~ directory to be also internal to the distrobox.
 


Follow Linux.org

Members online


Top