# depclean

> DepClean automatically detects and removes unused dependencies in Maven projects (https://dx.doi.org/10.1007/s10664-020-09914-8)

**Wikidata**: [Q127485509](https://www.wikidata.org/wiki/Q127485509)  
**Source**: https://4ort.xyz/entity/depclean

## Summary
DepClean is a software tool designed to automatically detect and remove unused dependencies in Maven projects. It functions as a build plugin that analyzes project bytecode to identify "bloated" dependencies that are declared but not actually utilized. The tool is free software released under the MIT License.

## Key Facts
- **Function:** Automatically detects and removes unused dependencies in Maven projects.
- **License:** MIT License.
- **Software Class:** Classified as free software and executable software.
- **Source Repository:** Hosted on GitHub at `https://github.com/ASSERT-KTH/depclean`.
- **Academic Source:** Described in the study "A comprehensive study of bloated dependencies in the Maven ecosystem" (DOI: 10.1007/s10664-020-09914-8).
- **Initial Release:** Version 1.0.0 was released on December 27, 2019.
- **Latest Stable Release:** Version 2.1.0, released on June 6, 2025.

## FAQs
### Q: What is the primary purpose of DepClean?
A: DepClean is used to optimize Maven projects by identifying and eliminating bloated dependencies—libraries that are included in the build configuration but are not actually used by the code. This helps reduce project size and complexity.

### Q: Under what license is DepClean distributed?
A: DepClean is distributed as free software under the MIT License, allowing users to freely run, study, change, and distribute it.

### Q: When was the first stable version of DepClean released?
A: The first stable version, version 1.0.0, was released on December 27, 2019.

### Q: Where can the source code for DepClean be found?
A: The source code is maintained in the ASSERT-KTH repository on GitHub.

## Why It Matters
DepClean addresses a critical issue in software engineering known as "dependency bloat." In modern software development, projects often rely on numerous external libraries. Over time, as code evolves, some of these libraries may cease to be used, yet they remain declared in the build configuration (such as the `pom.xml` file in Maven). This bloat increases the size of the final application binary, lengthens build times, and expands the attack surface for potential security vulnerabilities.

By automating the detection of these unused components, DepClean solves a maintenance problem that is tedious and error-prone to handle manually. It bridges the gap between academic research on software ecosystems and practical developer tools. Its development is backed by empirical research cited in the "Empirical Software Engineering" journal (indicated by the DOI), ensuring its logic is based on a comprehensive study of how Maven dependencies actually function in real-world ecosystems. This makes DepClean a vital utility for maintaining lean, efficient, and secure software supply chains.

## Notable For
- **Specialization:** Specifically targets the Maven build ecosystem for Java projects.
- **Automation:** Automates the removal of unused dependencies rather than just reporting them.
- **Research-Backed:** Its methodology is supported by the peer-reviewed paper "A comprehensive study of bloated dependencies in the Maven ecosystem."
- **Open Source:** Fully accessible as free software under the permissive MIT License.

## Body
### Functionality and Scope
DepClean operates as a tool within the Maven ecosystem. Its core function is to analyze the dependencies declared in a project's build file against the actual usage of those libraries in the project's bytecode. It identifies three main categories of usage: used, unused, and bloated (transitive dependencies that are directly used but not declared). By flagging these discrepancies, it allows developers to clean up their dependency trees.

### Development History
The project has seen active development since its initial stable release in late 2019.
- **Initial Phase:** Version 1.0.0 was published on December 27, 2019.
- **Iteration:** The tool went through several minor iterations in 2020, including versions 1.1.0 (May 2020) and 1.1.1 (December 2020).
- **Major Updates:** A significant update, version 2.0.0, was released on March 9, 2021.
- **Recent Updates:** Subsequent updates in the 2.0 series appeared throughout 2022 and early 2023 (versions 2.0.2 to 2.0.5).
- **Current State:** The preferred stable version listed in the knowledge base is 2.1.0, dated June 6, 2025.

### Classification and Licensing
DepClean is defined as a non-tangible executable component of a computer (software) and is explicitly classified as free software. It operates under the MIT License, one of the most permissive open-source licenses, which permits commercial use, modification, and distribution provided the copyright notice is included.

### Academic Context
The tool is explicitly linked to the academic publication "A comprehensive study of bloated dependencies in the Maven ecosystem," identified by the DOI `10.1007/s10664-020-09914-8`. This suggests the tool is either a product of the research conducted in that paper or serves as the reference implementation for the detection techniques described therein.

## References

1. [Release 1.0.0. 2019](https://github.com/ASSERT-KTH/depclean/releases/tag/1.0.0)
2. [Release 1.1.0. 2020](https://github.com/ASSERT-KTH/depclean/releases/tag/1.1.0)
3. [Release 1.1.1. 2020](https://github.com/ASSERT-KTH/depclean/releases/tag/1.1.1)
4. [Release 1.1.2. 2021](https://github.com/ASSERT-KTH/depclean/releases/tag/1.1.2)
5. [Release 2.0.0. 2021](https://github.com/ASSERT-KTH/depclean/releases/tag/2.0.0)
6. [Release 2.0.2. 2022](https://github.com/ASSERT-KTH/depclean/releases/tag/2.0.2)
7. [Release 2.0.3. 2022](https://github.com/ASSERT-KTH/depclean/releases/tag/2.0.3)
8. [Release 2.0.4. 2022](https://github.com/ASSERT-KTH/depclean/releases/tag/2.0.4)
9. [Release 2.0.5. 2023](https://github.com/ASSERT-KTH/depclean/releases/tag/2.0.5)
10. [Release 2.1.0. 2025](https://github.com/ASSERT-KTH/depclean/releases/tag/2.1.0)