Skip to content

Interactively find and recover deleted or 👉 overwritten 👈 files from your terminal

License

Notifications You must be signed in to change notification settings

PabloLec/RecoverPy

Repository files navigation

RecoverPy

RecoverPy

Find and recover deleted or even overwritten files from your Linux partitions, quickly and easily.



GitHub release License Downloads Tests


RecoverPy doesn't just recover deleted files, but also helps you recover overwritten data by scanning each disk block. Whether it's a lost snippet of code, accidentally deleted configs, or overwritten text files, RecoverPy gives you a powerful, interactive way to get it back.

✨ Features

  • ✅ Recover overwritten and deleted files
  • 🔍 Search file contents by string, even in binary files
  • 📟 Modern, easy-to-use terminal UI
  • 🐧 Linux compatible (all file systems supported)
  • ⚡️ Fast, leveraging core Linux utilities (grep, dd, lsblk)

🎬 Demo

RecoverPy Demo


📦 Installation

Warning: You must run RecoverPy as root (sudo).

RecoverPy is Linux-only. Make sure you have these common tools installed (grep, dd, lsblk). Optionally, install progress to monitor scan progress:

# Debian / Ubuntu
sudo apt install grep coreutils util-linux progress

# Arch
sudo pacman -S grep coreutils util-linux progress

# Fedora
sudo dnf install grep coreutils util-linux progress

Quick Run (no installation)

Using pipx:

sudo pipx run recoverpy

Or using uvx:

sudo uvx recoverpy

Install from PyPI

python3 -m pip install recoverpy
sudo recoverpy

💻 Usage

  1. Launch RecoverPy:
sudo recoverpy
  1. Select Partition:
    Choose the partition where your lost data resides. If unsure, try scanning your /home partition, it might contain editor or IDE backups.

  2. Search Content:
    Enter a unique string from the lost file content. RecoverPy will scan disk blocks to locate matches.

  3. Find & Recover:
    Results appear interactively. Select a result, preview the block, and save it. Explore neighboring blocks if the file spans multiple disk blocks.


💡 Recovery Tips

  • 🛑 Unmount partition first: Reduce risk of data overwriting.
  • 🎯 Be specific: Use unique, simple search strings.
  • Act quickly: The sooner you scan, the higher your recovery chances.
  • 📑 Check adjacent blocks: Your file might span several blocks—check them all.

🤝 Contributing

Found a bug or have an idea? PRs, issues, and suggestions are warmly welcome. Check out our contributing guide for how to get involved!


If RecoverPy saved your day, consider ⭐️ starring the repo, thanks for your support!