mail-expire command not found

In this troubleshooting guide we learn how to fix mail-expire command not found error message

Introduction

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

mail-expire: command not found

or when using sudo you get the following error message

sudo: mail-expire: command not found

Solutions to mail-expire: command not found

How To Fix mail-expire: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu mail-expire is provided by mail-expire package.

mail-expire is:

mail-expire is a tool which scans mail folders (Maildir or mbox files) for messages that are older than given maximum age and moves them to another (compressed) mbox file or just deletes them.

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

sudo apt-get -y install mail-expire

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

You can also use apt command to install mail-expire.

sudo apt -y install mail-expire

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

sudo aptitude install mail-expire

Summary

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