[](https://travis-ci.org/tweekmonster/moult)
Moult is a utility that can assist you in finding packages that may not be in use any more. It was created to help me clean up a project's requirements.txt file after a major overhaul. It's far from perfect, but it's a lot faster than figuring out what's actually needed in a `pip freeze` print out.
## Requirements
* `Python 2.7+`
* `pip 1.3+` is required, but is not listed as a dependency so you aren't forced to upgrade your installed version.
## Installation
Since you definitely have pip installed, you can run: `pip install moult`
## Handy Features
* Can be installed globally and ran in Virtual Environments
* Displays package dependencies
* Suggests packages that can be removed
* Search for installed packages using their package name or import path
* Scan your project directories or files to see what packages they are using
* Detects and loads Django settings to see what optional packages are in use
## Command Line Interface:
```
usage: moult [-h] [-V] [-s pkg [pkg ...]] [-l] [-a] [-f] [-r] [-v] [-p] [-d]
[--no-color | --no-colour]
[scan [scan ...]]
A utility for finding Python packages that may not be in use.
positional arguments:
scan Scans one or more directories or python files to determine
what packages they are using.
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-s pkg [pkg ...] Packages to search and check. Can be the package name or
import path. Hidden packages can be found, but will not be
a suggested removal without the -a flag.
-l Display local modules only.
-a Display hidden packages. Packages are hidden if they
installed scripts outside of their package directory, or
are hard coded as packages that aren't likely to be
imported by your scripts (virtualenv, pip, supervisor,
etc). When using the -p flag, hidden packages are prefixed
with an underscore so you are less likely to uninstall
them on accident.
-f, --freeze Print requirements like pip does, except for scanned
files. Requires scanned files to work. If no files or
directories are supplied for a scan, the current directory
will be scanned. Packages are sorted so that dependencies
are installed before dependnat packages. Flags below this
are ignored if enabled.
-r Recursively display removable packages.
-v Set verbosity level. -vv will include debug messages.
-p Prints a plain list of removable packages that's suitable
for copy and paste in the command line. Flags below this
are ignored if enabled.
-d Display detailed package dependencies.
--no-color Disable colored output.
--no-colour The classier way to disable colored output.
moult uses `pip` to find installed packages and determine which ones are not
in use. Unfortunately, not all packages install their dependencies for you. In
those cases, pip, and in turn moult, will have no clue. You must use your own
judgment to determine whether or not the packages listed by moult can actually
be removed without affecting your scripts.
Again, moult is helpful for listing packages that *may not* be in use. It is a
convenience and the output should not be blindly trusted.
```
Metadata
Release files for moult 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| moult-0.1.2.tar.gz | 19.6 kB | Without provenance | Details for moult-0.1.2.tar.gz |
Release files / moult-0.1.2.tar.gz
| Download URL | moult-0.1.2.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35ad55c6e008449b8382de77e4fba22cd121fdcab8aa3b9dcdb49c2599c57531
|
|
BLAKE2b-256 checksum How to use checksums |
0f2c533b2c48d1769376c3d16cb17afaccc552b0e82410ac57b58432c0e0724d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for moult 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.