When reinstalling, we add new pipelines to be installed to installed_es attributes of the saved object. If they are the same, as what is already installed (because of a reinstall) duplicates will exist because they have the same name, though duplicates of the actual elasticsearch pipeline asset will not exist. This could cause problems for each reinstall as a request to delete the same pipeline will be called for all the times it's been reinstalled. Realized this when doing a review: https://github.com/elastic/kibana/pull/74394/files#r483783627 . Can either not save dups in the first place or make sure the list of assets is unique. Or rethink how 'reinstall' works. Removing the whole package first, then installing it again, would also solve the problem.
A reinstall integration or unit test should be added to cover the case.
This is somewhat of an edgecase as users will not likely be reinstalling their packages.