Zerofree finds the unallocated blocks with non-zero value content in an ext2, ext3 or ext4 file-system and fills them with zeroes (zerofree can also work with another value than zero). This is mostly useful if the device on which this file-system resides is a disk image. In this case, depending on the type of disk image, a secondary utility may be able to reduce the size of the disk image after zerofree has been run. Zerofree requires the file-system to be unmounted or mounted read-only.
The usual way to achieve the same result (zeroing the unused blocks) is to run "dd" to create a file full of zeroes that takes up the entire free space on the drive, and then delete this file. This has many disadvantages, which zerofree alleviates:
The usual way to achieve the same result (zeroing the unused blocks) is to run "dd" to create a file full of zeroes that takes up the entire free space on the drive, and then delete this file. This has many disadvantages, which zerofree alleviates:
- it is slow;
- it makes the disk image (temporarily) grow to its maximal extent;
- it (temporarily) uses all free space on the disk, so other concurrent write actions may fail.
Original maintainer | Thibaut Paumard |
---|---|
Homepage | https://frippery.org/uml/ |
1.1.1











1.0.4






1.0.3


Distribution | Version | Since | Package | Installed | Packager | |
---|---|---|---|---|---|---|
![]() | deb | 1.1.1-1 | 2019-01-12 | 8.23 kiB | 25 kiB | Thibaut Paumard |
![]() | deb | 1.0.4-1 | 2017-11-10 | 7.87 kiB | 25 kiB | Thibaut Paumard |
![]() | rpm | 1.1.1-1.fc28 | 2019-01-14 | 29.2 kiB | 45.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-1.fc28 | 2019-01-14 | 29.2 kiB | 45.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-1.fc28 | 2019-01-14 | 29.2 kiB | 45.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-2.fc29 | 2019-01-14 | 26.7 kiB | 56.3 kiB | Fedora Project |
![]() | rpm | 1.1.1-2.fc29 | 2019-01-14 | 26.7 kiB | 56.3 kiB | Fedora Project |
![]() | rpm | 1.1.1-2.fc29 | 2019-01-14 | 26.7 kiB | 56.3 kiB | Fedora Project |
![]() | rpm | 1.1.1-2.fc29 | 2019-01-14 | 26.7 kiB | 56.3 kiB | Fedora Project |
![]() | rpm | 1.1.1-2.fc29 | 2019-01-14 | 26.7 kiB | 56.3 kiB | Fedora Project |
![]() | rpm | 1.1.1-2.fc29 | 2019-01-14 | 26.7 kiB | 56.3 kiB | Fedora Project |
![]() | rpm | 1.1.1-3.fc30 | 2019-06-17 | 27.1 kiB | 65.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-3.fc30 | 2019-06-17 | 27.1 kiB | 65.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-3.fc30 | 2019-06-17 | 27.1 kiB | 65.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-3.fc30 | 2019-06-17 | 27.1 kiB | 65.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-3.fc30 | 2019-06-17 | 27.1 kiB | 65.7 kiB | Fedora Project |
![]() | rpm | 1.1.1-4.fc31 | 2020-01-07 | 27.3 kiB | 55.9 kiB | Fedora Project |
![]() | rpm | 1.1.1-5.fc32 | 2020-02-08 | 27.2 kiB | 55.1 kiB | Fedora Project |
![]() | rpm | 1.1.1-4.fc31 | 2019-08-03 | 27.3 kiB | 55.9 kiB | Fedora Project |
![]() | rpm | 1.0.4-lp150.1.8 | 2019-01-17 | 22.2 kiB | 39.7 kiB | https://bugs.opensuse.org |
![]() | rpm | 1.0.4-lp151.2.3 | 2019-01-23 | 22.1 kiB | 39.6 kiB | https://bugs.opensuse.org |
![]() | rpm | 1.0.4-lp152.3.6 | 2020-01-17 | 22.1 kiB | 39.6 kiB | https://bugs.opensuse.org |
![]() | rpm | 1.0.3-11.1 | 2019-01-17 | 17.3 kiB | 39.7 kiB | http://bugs.opensuse.org |
![]() | rpm | 1.1.1-1.6 | Mar 14 | 22.2 kiB | 47.8 kiB | https://bugs.opensuse.org |
![]() | deb | 1.0.4-1 | 2017-11-10 | 7.92 kiB | 25 kiB | Ubuntu Developers |
![]() | deb | 1.0.4-1 | 2017-11-10 | 7.92 kiB | 25 kiB | Ubuntu Developers |
![]() | deb | 1.1.1-1 | 2019-01-14 | 8.32 kiB | 25 kiB | Ubuntu Developers |
![]() | deb | 1.1.1-1 | 2019-01-14 | 8.32 kiB | 25 kiB | Ubuntu Developers |
![]() | deb | 1.1.1-1 | 2019-06-17 | 8.32 kiB | 25 kiB | Ubuntu Developers |
![]() | deb | 1.1.1-1 | 2020-01-07 | 8.32 kiB | 25 kiB | Ubuntu Developers |
![]() | deb | 1.0.3-1 | 2017-11-10 | 7.74 kiB | 50 kiB | Ubuntu Developers |
Manual pages
zerofree(8)
zerofree — zero free blocks from ext2/3 file-systems
Latest updates

OpenSUSE Tumbleweed oss: Updated from 1.1.1-1.5 to 1.1.1-1.6
Mar 14
- update to 1.1.1:
- Lift call to ext2fs_free_blocks_count out of loop
- Add support for 64-bit block numbers

Fedora rawhide development/Everything-os: Updated from 1.1.1-4.fc31 to 1.1.1-5.fc32
2020-02-08

OpenSUSE Leap 15.2 oss: Updated from 1.0.4-lp152.3.5 to 1.0.4-lp152.3.6
2020-01-17
- adjust urls to new location

Fedora 31 releases/Everything-os: Version 1.1.1-4.fc31 introduced
2020-01-07

OpenSUSE Leap 15.2 oss: Version 1.0.4-lp152.3.5 introduced
2020-01-07
- adjust urls to new location

Ubuntu 20.04 focal/main: Version 1.1.1-1 introduced
2020-01-07
- Bug fix: "new upstream version", thanks to Christoph Anton Mitterer (Closes: #892518).
- Update VCS fields to salsa, use https in watch file, make lintian-clean.
- Check against Policy 4.1.3.

Ubuntu 19.10 eoan/main: Version 1.1.1-1 reintroduced
2019-08-19
- Bug fix: "new upstream version", thanks to Christoph Anton Mitterer (Closes: #892518).
- Update VCS fields to salsa, use https in watch file, make lintian-clean.
- Check against Policy 4.1.3.

Ubuntu 19.10 eoan/main: Version 1.1.1-1 removed
2019-08-19

Ubuntu 19.10 eoan/main: Version 1.1.1-1 reintroduced
2019-08-14
- Bug fix: "new upstream version", thanks to Christoph Anton Mitterer (Closes: #892518).
- Update VCS fields to salsa, use https in watch file, make lintian-clean.
- Check against Policy 4.1.3.

Ubuntu 19.10 eoan/main: Version 1.1.1-1 removed
2019-08-14

Fedora rawhide development/Workstation-os: Updated from 1.1.1-3.fc31 to 1.1.1-4.fc31
2019-08-03

Fedora rawhide development/Everything-os: Updated from 1.1.1-3.fc31 to 1.1.1-4.fc31
2019-08-03

Ubuntu 19.10 eoan/main: Version 1.1.1-1 reintroduced
2019-08-02
- Bug fix: "new upstream version", thanks to Christoph Anton Mitterer (Closes: #892518).
- Update VCS fields to salsa, use https in watch file, make lintian-clean.
- Check against Policy 4.1.3.

Ubuntu 19.10 eoan/main: Version 1.1.1-1 removed
2019-08-01

Fedora rawhide development/Server-os: Version 1.1.1-3.fc31 removed
2019-07-25

Fedora rawhide development/Everything-os: Updated from 1.1.1-3.fc30 to 1.1.1-3.fc31
2019-07-25

Fedora rawhide development/Server-os: Updated from 1.1.1-3.fc30 to 1.1.1-3.fc31
2019-07-24

Fedora rawhide development/Workstation-os: Updated from 1.1.1-3.fc30 to 1.1.1-3.fc31
2019-07-24

OpenSUSE Tumbleweed oss: Updated from 1.1.1-1.4 to 1.1.1-1.5
2019-07-16
- update to 1.1.1:
- Lift call to ext2fs_free_blocks_count out of loop
- Add support for 64-bit block numbers

OpenSUSE Tumbleweed oss: Updated from 1.1.1-1.2 to 1.1.1-1.4
2019-06-17
- update to 1.1.1:
- Lift call to ext2fs_free_blocks_count out of loop
- Add support for 64-bit block numbers
Related packages
zerofree-debuginfo - Debug information for package zerofree
zerofree-debugsource - Debug sources for package zerofree