Free an unregistered package?

When I dev a local, unregistered package (a Git repo), I don’t see a way to free it.

Here’s what I tried:

]add C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\

]dev ANewPackage
ERROR: The following package names could not be resolved:
 * ANewPackage (4f451f22-9f79-11e9-0804-effd68d8229a in manifest but not in project)
Please specify by known `name=uuid`.

]dev C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\
 Resolving package versions...
  Updating `C:\Users\Tucker\Desktop\julia-tests\ANotherPackage\Project.toml`
  [4f451f22] ~ ANewPackage v0.1.0 #master (C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\) ⇒ v0.1.0 [`C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\`]
  Updating `C:\Users\Tucker\Desktop\julia-tests\ANotherPackage\Manifest.toml`
  [4f451f22] ~ ANewPackage v0.1.0 #master (C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\) ⇒ v0.1.0 [`C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\`]

] free "C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\"
ERROR: `C:\\Users\\Tucker\\Desktop\\julia-tests\\ANewPackage\\` cannot be parsed as a package

]free ANewPackage
ERROR: cannot free an unpinned package that does not exist in a registry

I can remove the package and add it again, but that’s clumsy. It seems like perhaps once the package is deved, it only knows about the local path to the files, and hence it doesn’t know how to treat it like a repo any longer? Am I doing anything wrong here, or is there a better way?

1 Like

There are no version to free it to, you have to add it (by url) again. Note that you don’t have to remove it first though.


Thanks! That makes sense, and knowing that I don’t have to remove it is helpful.

Sorry to resurrect an old thread, but I ran into the same problem and after reading the accepted solution, I still don’t understand why I can’t free an unregistered package. How can it be that “There are no version to free it to”? The version number is specified in the package’s Project.toml.

I think I see what is happening, at least for remote unregistered packages.

When I add an unregistered package via its url, the url is placed in Julia’s Manifest.toml. When I dev that package, the url is replaced by the local path to the deved version. Thus, Manifest.toml no longer indicates where to find the source repo of the unregistered package. Since free doesn’t know where to find the official version of the package, it gives up.

It seems like this could be easily fixed either by retaining the repo-url key in the Manifest, or by allowing free to accept a url.


I had the same problem recently. I went in julia’s environments directory (normally ~/.julia/environments/, looked for the relevant environment, and edited its Project.toml to delete the unregistered package.

Solved the problem.