Revert Package update?


what is the proper procedure to revert the command

] up

It has happened frequently that updates broke my programs.
Pinning Package versions does not seem to work either, and its hard to figure out why this is blocked.

Thanks for any help.

(v1.0) pkg> add GR@v0.34.1
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package GR [28b8d3ca]:
 GR [28b8d3ca] log:
 ├─possible versions are: [0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0-0.9.17, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.20.0, 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0, 0.28.0, 0.29.0, 0.30.0, 0.31.0, 0.32.0-0.32.3, 0.33.1, 0.34.0-0.34.1, 0.35.0] or uninstalled                                                                                               
 ├─restricted to versions 0.34.1 by an explicit requirement, leaving only versions 0.34.1
 └─restricted by julia compatibility requirements to versions: 0.35.0 or uninstalled — no versions left

If you use git and commit your manifest file then you have full history. That’s the only undo mechanism at this point.

Thanks for the quick response.
I guess, I will just do a backup of the .julia folder before my next update. Not too much of a hassle.

You don’t need to back up all of ~/.julia, just a single manifest file. If you make the environments in ~/.julia/environments/v1.0 into git repos it works very well.

1 Like

If I only copy the manifest and project environment files to a fresh .julia directory, is that enough for the package manager to automatically download all packages, or do the packages directories need to copy also?

pkg> instantiate

Will install everything for you.

Is it enough to only copy/git the manifest or only the project toml? or are both needed.

Best to copy both. But the manifest is enough to install things. Loading is a different story.

Thanks, that’s pretty flexible.