My org is using multiple unlocked packages to organize components by purpose. This has caused the process of package version creation to be incredibly long due to a chain of dependencies.
Combining multiple unlocked packages into a single package would significantly ease the burden of packaging when it comes time for releases. I believe I'm in the last stretch of this process, but the big hurdle is the severing of ties between a component and the unlocked package it previously belonged to.
After removing a component from its current package (let's call it "objects") and adding it to the new package ("single-package") and successfully creating new versions for both, I arrive at the step where I go to Installed Packages and navigate into the currently installed version of "objects". From here I view the components, find the component I'm migrating, and click "Remove", after which I am able to install the new "single-package" unlocked package.
Is there any way to do this programmatically? I have been unable to find any metadata that may contain this link between component and package, but I would imagine there has to be a record that can be deleted or metadata property that can be changed.