pmailq command not found

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

Introduction

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

pmailq: command not found

or when using sudo you get the following error message

sudo: pmailq: command not found

Solutions to pmailq: command not found

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

In Ubuntu pmailq is provided by pmailq package.

pmailq is:

pmailq processes the output of the Postfix mailq command, and can list, parse (machine-readably), or delete queued messages in batches. They can be selected by size, by queue status, and by pattern matching (with wildcards) on recipient addresses and server error messages.

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

sudo apt-get -y install pmailq

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

You can also use apt command to install pmailq.

sudo apt -y install pmailq

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

sudo aptitude install pmailq

Summary

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