sponge command not found

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

Introduction

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

sponge: command not found

or when using sudo you get the following error message

sudo: sponge: command not found

Solutions to sponge: command not found

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

In Ubuntu sponge is provided by moreutils package.

moreutils is:

This is a growing collection of the Unix tools that nobody thought to write long ago, when Unix was young.

So far, it includes the following utilities:

  • chronic: runs a command quietly unless it fails
  • combine: combine the lines in two files using boolean operations
  • errno: look up errno names and descriptions
  • ifdata: get network interface info without parsing ifconfig output
  • ifne: run a program if the standard input is not empty
  • isutf8: check if a file or standard input is utf-8
  • lckdo: execute a program with a lock held
  • mispipe: pipe two commands, returning the exit status of the first
  • parallel: run multiple jobs at once
  • pee: tee standard input to pipes
  • sponge: soak up standard input and write to a file
  • ts: timestamp standard input
  • vidir: edit a directory in your text editor
  • vipe: insert a text editor into a pipe
  • zrun: automatically uncompress arguments to command

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

sudo apt-get -y install moreutils

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

You can also use apt command to install moreutils.

sudo apt -y install moreutils

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

sudo aptitude install moreutils

Summary

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