mh_clean command not found

In this troubleshooting guide we learn how to fix mh_clean command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

mh_clean: command not found

or when using sudo you get the following error message

sudo: mh_clean: command not found

Solutions to mh_clean: command not found

How To Fix mh_clean: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu mh_clean is provided by maven-repo-helper package.

maven-repo-helper is:

This package enables Debian packages which are not using Maven in their build process to provide and install Maven POMs and libraries in the repository located in /usr/share/maven-repo.

Packages built with Maven (using maven-debian-helper) will benefit as many of their dependencies are already packaged in Debian but they are missing the necessary metadata (Maven POM) which is required by Maven when it is using dependencies.

A tutorial is available at /usr/share/doc/maven-repo-helper/tutorial.html

To fix this problem, we can install more using the command below.

sudo apt-get -y install maven-repo-helper

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install maven-repo-helper.

sudo apt -y install maven-repo-helper

Or if you have aptitude installed you can use the following command.

sudo aptitude install maven-repo-helper

Summary

In this tutorial we learn how to fix mh_clean command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.