Why do the removed packages surge back after Pkg.update()?



Why every time when a package is removed by Pkg.rm does it come back again once I run Pkg.update()? It really drives me nuts.


Is it a dependency of another package?


I thought even it’s the dependency of some other packages, this shouldn’t happen.

On another note, suppose that I have package A installed using Pkg.add() since I wanted to use the tagged version. Now, I fork it from its Github repo directly, because I want to work on this package by editing it. The only way I know to let Julia use the forked copy, not the Pkg-checked-out copy, is to remove the Pkg copy and add the path of the forked copy to julia PATH. If the removed packages keep re-emerging just because I do Pkg.update(), how can I update? It doesn’t make sense.


You can edit packages you’ve added. Pkg2’s add clones and checks out a release. checkout will switch to master.
Semicolon let’s you run terminal commands, like using git, from within Julia. I’d recommend managing versions and switching between your branches and tagged releases that way.
If you didn’t change the definitions of any types, Revise will actually load all the diffs for you as soon as you switch branches!

This may have changed for Pkg3, because often you don’t want the entire commit history.
Haven’t tried it yet, since I do my developing on 0.6 (last I checked, Revise doesn’t support 0.7 yet), and only periodically move it to 0.7 for testing/making sure there are no dep-warnings.

But Pkg3 will definitely make your life easier, since it supports having multiple projects, environment, packages of the same name, etc.