Uninstall a package from another package?


Is there a way to uninstall a package from another package? I’m doing a package, package-cop that can disable, deactivate, and unload another package and I thought it might as well also support an uninstall.

Do you think just deleting the folder would work? Would it leave some other Atom data structure in a bad state? I might have trouble with things locked but that is my problem.


Why not just shell out to apm?


Duh. Thx.


By looking at settings-view you should be able to figure out which API call to uninstall a package.

Not really related, but I thought of a feature for atom packages depending on another package. For instance, whether it’s minimap plugins, autocomplete providers or build plugins in a build system, we’ll see more and more package whose purpose is to extend another package. These packages could just declare a plugin or extend field in their package.json with the name of the package they extend. Apm could prevent the installation of these packages if the master package is not installed, or even install it automatically. Also, uninstalling/deactivating the master package could do the same with all its plugins.
The settings view could regroup these packages as descendants of their master package (as an accordion in the left list). Settings of these packages could also be grouped in a single interface in the master settings view.