# Check for packages that are imported but not used?

**URL:** <https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571>\
**Category:** General Usage\
**Created:** [December 11, 2018, 6:05pm UTC](https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571 "2018-12-11T18:05:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Post date:** [December 11, 2018, 6:05pm UTC](https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571/1 "2018-12-11T18:05:46Z")

</div>

Is there a way to check for packages that have been imported through `using` but aren’t actually being used?

I’m trying to split an overgrown package up into smaller chunks and this functionality would be really helpful

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [December 11, 2018, 6:15pm UTC](https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571/2 "2018-12-11T18:15:34Z")

</div>

This kind of functionality should be a part of linting. It would be really cool if the text editor would give you a warning that something is imported but not used (same way Spyder does it).

---

<div class="post-metadata">

**Author:** ![Nosferican](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nosferican/32/9275_2.png) [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Post date:** [December 12, 2018, 2:58am UTC](https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571/3 "2018-12-12T02:58:39Z")

</div>

Be explicit in the module

```julia
using A: a, b, c
using B: d, e, f
import A: Ab, Ac

```

Usually tracking those and a good test suite will answer that question.

---

<div class="post-metadata">

**Author:** ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Post date:** [December 12, 2018, 8:18pm UTC](https://discourse.julialang.org/t/check-for-packages-that-are-imported-but-not-used/18571/4 "2018-12-12T20:18:06Z")

</div>

Testing and extracting functions is definitely a nice way to minimise, but it would be nice to have something other than run/error testing approaches for detecting when the minimum function set is specified
