code: public function removePackage(PackageInterface $package)
      {
          $packageId = $package->getUniqueName();
  
          foreach ($this->getPackages() as $key => $repoPackage) {
              if ($packageId === $repoPackage->getUniqueName()) {
                  array_splice($this->packages, $key, 1);
  
                  return;
              }
          }
      }
docs: Removes package from repository.
  
  @param PackageInterface $package package instance