Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

remove-forever
Remove forever

Data erasure solution for files on deno πŸ¦•

❓ Why

When you delete a file using the rm UNIX command or with any software, it only removes direct pointers to the data disk sectors and make the data recovery possible with common software tools.

Permanent data erasure goes beyond basic file deletion commands, which:

  1. Allow for selection of a specific standard, based on unique needs,
  2. Verify the overwriting method has been successful and removed data across the entire device.

πŸ”© How It Works

The basic principle is to write files before deletion in order to make recovery harder. With remove-forever, you get to choose the standard that follow your needs. Each one is composed of instructions about how many passes it should perform.

It goes from a simple pass of zeros to a 35 passes algorithm. Remove-forever comes with its own algorithm to ensure your data is safe:

  • A pass of cryptographically strong pseudo-random data,
  • The file is then renamed,
  • Truncated to hide the file size.
  • And finally files timestamps are randomized.

✨ Features

Remove-forever is composed of two parts: a deno module with a straightforward API and a command line interface optimized to delete files on the fly.

πŸ“¦ CLI Installation

Deno required.

deno install --allow-write --allow-read --unstable -n remove https://deno.land/x/remove_forever/cli.ts

Note: Due to the use of Deno.utime and the confirmation request in the CLI, you will need to use the --unstable flag.

πŸš€ Quick Start

If you want your application to delete specific files with a pass of cryptographically strong pseudo-random data, use one of these code snippets:

import remove from "https://deno.land/x/remove_forever/mod.ts";

await remove("./trash")
await remove("./vault/secret.txt")

πŸ“‹ Examples

import { remove, fileStandards, directoryStandards } from "./mod.ts";

const count = await remove("./trash/secret.txt", {
  fileStandard: fileStandards.gutmann.remove,
  directoryStandard: directoryStandards.unsafe.remove,
  ignoreErrors: true,
});

console.log(`Removed ${count} files and folders!`)

cli help

πŸ“œ Changelog / History

See the changelog or releases.

🧾 Roadmap

See the open issues and project boards for a list of proposed features (and known issues).

πŸ—οΈ Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Make sure that deno test and deno fmt do not generate errors
  5. Push to the Branch (git push origin feature/AmazingFeature)
  6. Open a Pull Request

Licensing

Icon library by Icons8.

This project is under MIT License.