distrobox icon indicating copy to clipboard operation
distrobox copied to clipboard

[Suggestion] Clean up exported apps when removing container

Open michallepicki opened this issue 3 years ago • 2 comments

Currently when distrobox-export was used from inside a container, and this container is being removed with distrobox rm on the host without running distrobox-export -d first, there are leftover files on the host system.

Describe the solution you'd like Before removing the container, there could be additional logic to check if there were any apps exported from it, and clean them up from the host system.

michallepicki avatar Jun 03 '22 13:06 michallepicki

That's a really good idea :+1:

89luca89 avatar Jun 03 '22 13:06 89luca89

Just my two cents here, but perhaps a storage file of sorts could be kept by distrobox in some system folder such that it always knows which apps it has exported and which files it created for each one? (Maybe a .json or .yaml file perhaps? Or maybe a custom, simpler format?)

That would certainly simplify the logic necessary to implement auto-cleaning exports on distrobox removal, and even allow for removing exports after the container was deleted and/or without having to enter the container, I believe

PgBiel avatar Jun 14 '22 04:06 PgBiel

This has already been implemented

89luca89 avatar Aug 04 '23 20:08 89luca89