tmpreaper command not found

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

Introduction

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

tmpreaper: command not found

or when using sudo you get the following error message

sudo: tmpreaper: command not found

Solutions to tmpreaper: command not found

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

In Ubuntu tmpreaper is provided by tmpreaper package.

tmpreaper is:

This package provides a program that can be used to clean out temporary-file directories. It recursively searches the directory, refusing to chdir() across symlinks, and removes files that haven’t been accessed in a user-specified amount of time. You can specify a set of files to protect from deletion with a shell pattern. It will not remove files owned by the process EUID that have the w' bit clear, unless you ask it to, much like rm -f’. `tmpreaper’ will not remove symlinks, sockets, fifos, or special files unless given a command line option enabling it to.

WARNING: Please do not run tmpreaper' on /’. There are no protections against this written into the program, as that would prevent it from functioning the way you’d expect it to in a `chroot(8)’ environment.

The daily tmpreaper run can be configured through /etc/tmpreaper.conf .

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

sudo apt-get -y install tmpreaper

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

You can also use apt command to install tmpreaper.

sudo apt -y install tmpreaper

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

sudo aptitude install tmpreaper

Summary

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