Removed dev Pkg before free (1.6 and 1.7)

I added a package and then dev’ed it and then removed it before freeing it. Now I am getting an error that I can’t fix. I removed the registries directory and also downloaded julia 1.7 and started fresh, but I get the following error:

(@v1.7) pkg> add https://github.com/jacob-roth/PowerDynamics.jl.git
     Cloning git-repo `https://github.com/jacob-roth/PowerDynamics.jl.git`
ERROR: failed to clone from https://github.com/jacob-roth/PowerDynamics.jl.git, error: GitError(Code:ERROR, Class:OS, could not remove directory '/Users/myuser/.julia/clones/231828409692979274/refs/remotes/origin/compathelper/new_version/2020-08-01-00-06-19-852-2271493462': parent is not directory: Not a directory)

The clone '/Users/myuser/.julia/clones/231828409692979274/ does not exist. What can I do?

Reposted here: https://stackoverflow.com/questions/70228185/removed-dev-pkg-before-free-1-6-and-1-7

Maybe deleting the Manifest.toml for the environment you are using could help?

I downloaded 1.7 and tried this, so I think that this happened even with a fresh Manifest file

Deleting the whole .julia/ directory didn’t resolve this.

this shouldn’t be happening, deleting .julia should clean up everything. Unless you’re using a project somewhere else, other wise it would be your system’s issue (like filesystem permission and so on)

I wonder if it’s an issue with my git or Pkg, since the clone doesn’t exist on my machine, but Pkg still keeps trying to find it? I rmd Pkg and retried, but that didnt help.