2023-11-25 14:44:46 +01:00
|
|
|
## gowipe - securely delete files and directories (not for SSD)
|
|
|
|
|
|
2025-11-25 22:15:08 +01:00
|
|
|
[](https://ci.codeberg.org/repos/15612)
|
|
|
|
|
[](https://codeberg.org/scip/gowipe/raw/branch/main/LICENSE)
|
|
|
|
|
[](https://goreportcard.com/report/codeberg.org/scip/gowipe)
|
2025-01-18 11:35:12 +01:00
|
|
|
|
2025-01-19 16:23:16 +01:00
|
|
|
## Description
|
|
|
|
|
|
|
|
|
|
`gowipe` is a simple self contained tool to securely wipe files and
|
|
|
|
|
directories. By default it renames and overwrites files and
|
|
|
|
|
directories 30 times and uses the `secure` mode, which uses strong
|
|
|
|
|
random bytes for the overwriting process. Gowipe writes as much bytes
|
|
|
|
|
into a file as its original size.
|
|
|
|
|
|
|
|
|
|
You can tweak mode and round numbers. Other modes are `zero`, which
|
|
|
|
|
uses zeroes for overwriting (not recommended) or `encrypt` which
|
2025-02-05 18:03:52 +01:00
|
|
|
encrypts the data using ChaCha20Poly1305 and a strong random key. This is the most
|
2025-01-19 16:23:16 +01:00
|
|
|
secure but also to slowest mode.
|
|
|
|
|
|
|
|
|
|
Although you can use `gowipe` on SSD disks, it doesn't make much
|
|
|
|
|
sense. To wipe such a disk you have to resort to other means. But you
|
|
|
|
|
can savely use it on magnetic discs or usb drives.
|
|
|
|
|
|
|
|
|
|
Of course there are many other such tools available, this one is
|
|
|
|
|
insofar special as you can download a pre-compiled binary without any
|
|
|
|
|
library dependencies. This allows you to wipe files on systems, where
|
|
|
|
|
you cannot install a wiper via some package management (such as
|
|
|
|
|
appliance systems or vm's).
|
|
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
|
|
Overwrite the directory `vhs` recursively 50 times using strong
|
|
|
|
|
encryption and verbose output:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
gowipe -c 50 -E -r -v vhs
|
|
|
|
|
Wiped vhs/help.png (355011 bytes)
|
|
|
|
|
Wiped vhs/rec.Dockerfile (348 bytes)
|
|
|
|
|
Wiped vhs/rec.gif (3533338 bytes)
|
|
|
|
|
Wiped vhs/rec.tape (852 bytes)
|
|
|
|
|
Wiped vhs (4096 bytes)
|
|
|
|
|
|
|
|
|
|
Dirs wiped: 1
|
|
|
|
|
Files wiped: 5
|
|
|
|
|
Bytes deleted: 3889549
|
|
|
|
|
Time elapsed: 426.286639ms
|
|
|
|
|
Overwritten: 50 times
|
|
|
|
|
Wipe mode: encrypt
|
|
|
|
|
Recurse dirs: true
|
|
|
|
|
```
|
|
|
|
|
|
2025-01-19 16:27:03 +01:00
|
|
|
## Usage
|
2025-01-18 11:35:12 +01:00
|
|
|
|
2023-11-25 14:44:46 +01:00
|
|
|
```
|
|
|
|
|
Usage: gowipe [-rcvz] <file|directory>...
|
|
|
|
|
|
|
|
|
|
Options:
|
|
|
|
|
-r --recursive Delete <dir> recursively
|
|
|
|
|
-c --count <num> Overwrite files <num> times
|
|
|
|
|
-m --mode <mode> Use <mode> for overwriting (or use -E, -S, -M, -Z)
|
|
|
|
|
-n --nodelete Do not delete files after overwriting
|
|
|
|
|
-N --norename Do not rename the files
|
|
|
|
|
-v --verbose Verbose output
|
|
|
|
|
-V --version Show program version
|
|
|
|
|
-h --help Show usage
|
|
|
|
|
|
|
|
|
|
Available modes:
|
|
|
|
|
zero Overwrite with zeroes (-Z)
|
|
|
|
|
math Overwrite with math random bytes (-M)
|
|
|
|
|
secure Overwrite with secure random bytes (default) (-S)
|
|
|
|
|
encrypt Overwrite with ChaCha2Poly1305 encryption (most secure) (-E)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Getting help
|
|
|
|
|
|
2023-11-25 14:53:07 +01:00
|
|
|
Although I'm happy to hear from gowipe users in private email,
|
2023-11-25 14:44:46 +01:00
|
|
|
that's the best way for me to forget to do something.
|
|
|
|
|
|
|
|
|
|
In order to report a bug, unexpected behavior, feature requests
|
|
|
|
|
or to submit a patch, please open an issue on github:
|
2025-11-25 22:15:08 +01:00
|
|
|
https://codeberg.org/scip/gowipe/issues.
|
2023-11-25 14:44:46 +01:00
|
|
|
|
|
|
|
|
## Copyright and license
|
|
|
|
|
|
|
|
|
|
This software is licensed under the GNU GENERAL PUBLIC LICENSE version 3.
|
|
|
|
|
|
|
|
|
|
## Authors
|
|
|
|
|
|
|
|
|
|
T.v.Dein <tom AT vondein DOT org>
|
|
|
|
|
|
|
|
|
|
## Project homepage
|
|
|
|
|
|
2025-11-25 22:15:08 +01:00
|
|
|
https://codeberg.org/scip/gowipe
|