How do you clear cache from a __precompile__()?



Sometimes it’s difficult to debug a package that’s precompiled.

What’s the most succinct way to clear its cache w/o just removing the package and reinstalling it?

i.e. the following code doesn’t seem to clear everything:"Foo")

Is manually changing a file somewhere in the package the best option?

(and does it clear all the cache it needs to?)


Take a look at base/loading.jl, there is a handy function that searches for cachefiles: Base.find_all_in_cache_path.

map(rm, Base.find_all_in_cache_path(:BenchmarkTools))


Just thought I’d put the nuclear option here too:

map(x->map(rm, Base.find_all_in_cache_path(Symbol(x))), keys(Pkg.installed()))

Ok to nuke the Pkg .cache directory?