How To Install Fallocate?

How To Install Fallocate?

fallocate

Reserve or deallocate disk space to files.
The utility allocates space without zeroing.

Maintainer: LaMont Jones


Section: utils

Install fallocate

  • Debian apt-get install util-linux Click to copy
  • Ubuntu apt-get install util-linux Click to copy
  • Alpine OS apk add util-linux Click to copy
  • Arch Linux pacman -S util-linux Click to copy
  • Kali Linux apt-get install util-linux Click to copy
  • CentOS yum install util-linux Click to copy
  • Fedora dnf install util-linux Click to copy
  • Raspbian apt-get install util-linux Click to copy
  • macOS brew install util-linux Click to copy

Reserve or deallocate disk space to files. The utility allocates space without zeroing.

How to use fallocate?

Below are few example commands for fallocate that you can use in the terminal.

Reserve a file taking up 700MB of disk space:
fallocate --length 700M path/to/fileClick to copy
Shrink an already allocated file by 200MB:
fallocate --collapse-range --length 200M path/to/fileClick to copy
Shrink 20MB of space after 100MB in a file:
fallocate --collapse-range --offset 100M --length 20M path/to/fileClick to copy
Installation of latest fallocate command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.