Module uninstall dependencies
You can, if you write the code for doing that yourself. Core currently doesn't offer a way to do that automatically.

See Impossible to uninstall Flag and the linked issue for Simplenews for inspiration.