How to reuse the packages downloaded by earier version in Julia?

Viewed 187

I have many packages downloaded in my linux PC for julia (1.6.4) but after downloading the new version of julia(1.7.1) it's saying packages are not installed and asking to download them again. Is there any way to reuse those packages without downloading them again?

1 Answers

So I've re-opened this question because, while Do I need re-add packages after upgrade Julia touches on one part of the solution, there's a more robust option not mentioned there that may serve you well throughout package operations — offline mode! This is precisely why I asked the question I did in the comments.

Offline mode will force Pkg to re-use already-downloaded packages, even when re-adding them, even across versions. Of course the operation will fail if no versions of the package (and its dependencies) are downloaded, but it'll at least try to make the already-downloaded stuff work.

This is essential because it also allows you to create local environments without hitting the network, too. Of course, you'll need to go back online to actually grab new packages and updates, but this may help some slow network speeds.

Related