Skip to content

pashkov256/deletor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

deletor

MIT codecov

Manage and delete files efficiently with an interactive TUI and scriptable CLI.


Deletor is a handy file deletion tool that combines a powerful text interface (TUI) with visual directory navigation, and classic command line mode (CLI). With it, you can quickly find and delete files by filters, send them to the trash or completely erase them, as well as clear the cache, both interactively and through scripts.

Features

  • πŸ–₯️ Interactive TUI: Modern text-based user interface for easy file navigation and management
  • πŸ–±οΈ Mouse Support: Full mouse support for selection, scrolling, and interaction
  • πŸ”’ Multi-Selection: Select multiple files at once for batch operations
  • ♻️ Safe Deletion: Files: Are moved to the system trash/recycle bin instead of permanent deletion
  • 🧹 OS Cache Cleaner: Free up space by deleting temporary system cache
  • πŸ› οΈ Deep Customization Shape the tool to behave exactly how you need
  • 🧠 Rules System: Save your filter settings and preferences for quick access
  • πŸ“– Log Operations: Log the various fields and look at the tui table, or parse the file
  • ⏳ Modification Time Filter: Delete files older,newer than X days/hours/minutes
  • πŸ“ Size Filter: Deletes only files larger than the specified size
  • πŸ—‘οΈ Extensions Filter: Deletes files with specified extensions
  • πŸ“‚ Directory Navigation: Easy navigation through directories with arrow keys
  • 🎯 Quick Selection: Select and delete files with keyboard shortcuts
  • βœ… Confirmation Prompt: Optional confirmation before deleting files

Project Banner

πŸ“¦ Installation

Using Go

go install github.com/pashkov256/deletor@latest

πŸ›  Usage

TUI Mode (default):

deletor

CLI Mode (with filters):

deletor -cli -d ~/Downloads -e mp4,zip  --min-size 10mb -subdirs --exclude data,backup

Dev launch:

go run . -cli -d ~/Downloads -e mp4,zip  --min-size 10mb -subdirs --exclude data,backup

βš™οΈ CLI Flags

Flags Description
-e Comma-separated list of extensions (e.g., mp4,zip,jpg).
-d Path to the file search directory.
--min-size Minimum file size to delete (e.g., 10kb, 1mb, 1gb).
--max-size Maximum file size to delete (e.g., 10kb, 1mb, 1gb).
--older Modification time older than (e.g., 1sec, 2min, 3hour, 4day).
--newer Modification time newer than (e.g., 1sec, 2min, 3hour, 4day).
--exclude Exclude specific files/paths (e.g., data, backup).
-subdirs Include subdirectories in scan. Default is false.
-prune-empty Delete empty folders after scan.
-rules Running with values from the rules
-progress Display a progress bar during file scanning.
-skip-confirm Skip the confirmation of deletion.

✨ The Power of Dual Modes: TUI and CLI

  • TUI mode provides a user-friendly way to navigate and manage files visually, ideal for manual cleanups and exploration.

  • CLI mode is perfect for automation, scripting, and quick one-liners. It's essential for server environments, cron jobs, and integrating into larger toolchains.

πŸ›  Contributing

We welcome and appreciate any contributions to Deletor! There are many ways you can help us grow and improve:

  • πŸ› Report Bugs β€” Found an issue? Let us know by opening an issue.
  • πŸ’‘ Suggest Features β€” Got an idea for a new feature? We'd love to hear it!
  • πŸ“š Improve Documentation β€” Help us make the docs even clearer and easier to use.
  • πŸ’» Submit Code β€” Fix a bug, refactor code, or add new functionality by submitting a pull request.

Before contributing, please take a moment to read our CONTRIBUTING.md guide. It explains how to set up the project, coding standards, and the process for submitting contributions.

Together, we can make Deletor even better! πŸš€

AI docs

https://code2tutorial.com/tutorial/3aac813f-99c2-453f-819f-c80e4322e068/index.md

πŸ“œ License

This project is distributed under the MIT license.


Thank you to these wonderful people for their contributions!