# SwiftPM needs a way to ignore or reset its recorded commit for a package

**URL:** <https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945>\
**Category:** Pitches\
**Tags:** packagemanager, development\
**Created:** [July 14, 2022, 11:53am UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945 "2022-07-14T11:53:09Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![samdeane](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/samdeane/32/2175_2.png) [@samdeane](https://forums.swift.org/u/samdeane)\
**Post date:** [July 14, 2022, 11:53am UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/1 "2022-07-14T11:53:09Z")

</div>

`error: Revision e0cfeeeb0c951329c4eabf65ea967384b16dd695 for actionbuilderplugin remoteSourceControl https://github.com/elegantchaos/ActionBuilderPlugin.git version 1.0.3 does not match previously recorded value 5012c06ecaa241ecc171da7320ec1b2fd886e181`

This sort of error can occur for legitimate reasons, for example during development, if a tag has been mistakenly attached to the wrong commit and later corrected and force-pushed.

Currently the way to resolve this seems to be to remove the `Package.resolved` file and delete the `~/.swiftpm` directory.

We could do with a simple way to tell SPM "it's ok, I know what I'm doing and you can ignore it" in these cases.

Some alternatives:

- a flag like `--disable-security-checks` which applies to any other command which causes package resolution to run
- some new command like `swift package purge-security-cache`
- an enhancement to `swift package purge-cache` to also include these values when purging

(note that "security-checks" probably isn't the right terminology - I just plucked that out of the air)

---

<div class="post-metadata">

**Author:** ![samdeane](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/samdeane/32/2175_2.png) [@samdeane](https://forums.swift.org/u/samdeane)\
**Post date:** [July 14, 2022, 12:05pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/3 "2022-07-14T12:05:00Z")

</div>

An update could have additional/unforeseen consequence. I didn't try resolve, and I've deleted the problem now locally so I can't test easily, but I don't think it would fix it.

---

<div class="post-metadata">

**Author:** ![NeoNacho](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/neonacho/32/1368_2.png) [@NeoNacho](https://forums.swift.org/u/NeoNacho)\
**Post date:** [July 14, 2022, 5:26pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/4 "2022-07-14T17:26:04Z")

</div>

This already exists:

```swift
--resolver-fingerprint-checking <resolver-fingerprint-checking>
                          (default: strict)

```

The other value is `warn`, not entirely sure why it is not shown in the help output.

---

<div class="post-metadata">

**Author:** ![SDGGiesbrecht](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/sdggiesbrecht/32/4768_2.png) [@SDGGiesbrecht](https://forums.swift.org/u/SDGGiesbrecht)\
**Post date:** [July 14, 2022, 10:54pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/5 "2022-07-14T22:54:11Z")

</div>

That does not sound like it deletes the stale fingerprint though. Or does it? If not, that is only a “solution” if you apply it to every invocation for the rest of your device’s lifetime.

---

<div class="post-metadata">

**Author:** ![NeoNacho](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/neonacho/32/1368_2.png) [@NeoNacho](https://forums.swift.org/u/NeoNacho)\
**Post date:** [July 14, 2022, 11:16pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/6 "2022-07-14T23:16:35Z")

</div>

That's right, it is similar to the proposed `--disable-security-checks`, I guess, not the other alternatives.

---

<div class="post-metadata">

**Author:** ![samdeane](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/samdeane/32/2175_2.png) [@samdeane](https://forums.swift.org/u/samdeane)\
**Post date:** [July 15, 2022, 12:45pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/7 "2022-07-15T12:45:21Z")

</div>

So perhaps the proposal should be to add a third option `reset` to `--resolver-fingerprint-checking`, which would ignore previous results and instead record the current ones for future checking.

---

<div class="post-metadata">

**Author:** ![doozMen](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/doozmen/32/7803_2.png) [@doozMen](https://forums.swift.org/u/doozMen)\
**Post date:** [September 16, 2024, 2:06pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/8 "2024-09-16T14:06:12Z")

</div>

> [@NeoNacho](#):
>
> `resolver-fingerprint-checking`

I know this is not for xcode issues but in xcode 16 you are now stuck on this. Will not resolve anymore if the tag changed hash.... nothing helps anymore. Althought the cli swift build works fine ... pfff

---

<div class="post-metadata">

**Author:** ![NeoNacho](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/neonacho/32/1368_2.png) [@NeoNacho](https://forums.swift.org/u/NeoNacho)\
**Post date:** [September 16, 2024, 5:21pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/9 "2024-09-16T17:21:45Z")

</div>

Looks like in Xcode, a `IDEPackageFingerprintPolicy` user default exists, with presumably the same values as the SwiftPM CLI option.

---

<div class="post-metadata">

**Author:** ![doozMen](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/doozmen/32/7803_2.png) [@doozMen](https://forums.swift.org/u/doozMen)\
**Post date:** [September 26, 2024, 8:34am UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/10 "2024-09-26T08:34:31Z")

</div>

Thanks will have a look next time I run into this problem

---

<div class="post-metadata">

**Author:** ![farkasseb](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/farkasseb/32/37716_2.png) [@farkasseb](https://forums.swift.org/u/farkasseb)\
**Post date:** [October 12, 2024, 1:01am UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/11 "2024-10-12T01:01:00Z")

</div>

Removing `~/Library/Caches/org.swift.swiftpm` and `~/Library/org.swift.swiftpm` helped me. (You can get more granular, I went with the nuclear option.)

---

<div class="post-metadata">

**Author:** ![jgale](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jgale/32/37812_2.png) [@jgale](https://forums.swift.org/u/jgale)\
**Post date:** [October 18, 2024, 3:30pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/12 "2024-10-18T15:30:24Z")

</div>

> [@farkasseb](#):
>
> Removing `~/Library/Caches/org.swift.swiftpm` and `~/Library/org.swift.swiftpm` helped me. (You can get more granular, I went with the nuclear option.)

Thanks for posting this, I could not resolve this error in Xcode until I did this.

---

<div class="post-metadata">

**Author:** ![ZachNagengast](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/zachnagengast/32/43015_2.png) [@ZachNagengast](https://forums.swift.org/u/ZachNagengast)\
**Post date:** [October 27, 2025, 10:15pm UTC](https://forums.swift.org/t/swiftpm-needs-a-way-to-ignore-or-reset-its-recorded-commit-for-a-package/58945/13 "2025-10-27T22:15:19Z")

</div>

Chiming in here after a deep dive, I believe this may have been the source of the issue [Fix inverted logic on registry cache expiration by ZachNagengast · Pull Request #9144 · swiftlang/swift-package-manager · GitHub](https://github.com/swiftlang/swift-package-manager/pull/9144)
