Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing Versions from CocoaPods Specs Repo

I've just published a Beta version of a Pod in the Specs Repo, using pod trunk push. I would like to know if is there any way of removing this version Spec from the Spec Repo. I didn't find any way of doing this via the pod command.

like image 847
Rafael Veronezi Avatar asked Jun 25 '15 03:06

Rafael Veronezi


People also ask

How do I remove pod dependency?

Just rm -rf that pod's folder, and remove the line from the Podfile. Then run pod install again.

How do I get specific version of Pod?

In your podfile, write : pod 'podname', 'desired version'. Run pod update or pod install (as applicable) to get the pods as mentioned in above step. Compile the code with your desired pod version.

What is Podspec in CocoaPods?

A specification describes a version of Pod library. It includes details about where the source should be fetched from, what files to use, the build settings to apply, and other general metadata such as its name, version, and description. A stub specification file can be generated by the pod spec create command.


3 Answers

CocoaPods now provides a CLI for deleting pods, it can be done with:

pod trunk delete PODNAME VERSION

Original answer:

Removing specs is highly discouraged. If you push a spec intending to remove it later you shouldn't push it in the first place. This is because if any users are using your spec as soon as you remove it their project will break. If this was an accident you can submit a pull request to the specs repo removing your version. Also worth noting after removing this version you can never again push a spec with the same version number.

like image 142
Keith Smiley Avatar answered Sep 22 '22 06:09

Keith Smiley


You can now delete specific versions of a Pod to correct an accidental push.

pod trunk delete PODNAME VERSION

You can also deprecate an entire Pod and all versions

pod trunk deprecate PODNAME

Reference: https://github.com/CocoaPods/cocoapods-trunk/blob/master/CHANGELOG.md#100beta1-2015-12-30

Note that you need to be using pod version 1.0.0.beta.2 or greater. Run pod --version to check. To install the beta, run sudo gem install pod -v 1.0.0.beta.3 (get the latest version from the ChangeLog)

like image 29
William Denniss Avatar answered Sep 23 '22 06:09

William Denniss


This is what worked for me:

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Releases.
  3. On the Releases page, to the right of the release you want to delete, click Edit.
  4. Delete

source

like image 33
Luda Avatar answered Sep 24 '22 06:09

Luda