Tool to tell if a package has unused dependencies or using unused packages

Sorry to resurrect this old topic but I noted a corner case:

Imagine that in MyPkg.jl I do a

using Printf: @printf

then

julia> isdefined(MyPkg,:Printf)
false

and the remove would incorrectly (at least to me) suggest to remove Printf. Any way to programmatically check for unused deps?

2 Likes