Randomly delete half your files with Lots
Mar 2, 2026
The other day, I figured it would be cool to randomly delete half of all my computer files. So I wrote a program that helps me do that! It's called lots, named after the form of cleromancy mentioned frequently in the Bible. I leave the fate of my /boot/loader/ to Him.
Lots doesn't actually delete or modify files itself; it returns a randomly-selected list of files, which you can then pipe into other commands.
# WARNING!!!! DO NOT RUN THIS LMAO
$ lots | xargs rm
# ^
# Executes the `rm` command for each file.
I chose this design for several reasons:
- Flexibility: You can pipe the output into anything you want!
vim,git,rsync, I don't ask questions. - Customization: Lots features a suite of options specialized for file selection, such as percentage-based or value-based selection strategies, recursive depth limits, and various filtering options.
- Safety: Nuking half your files with a short command like
lotswould be beyond terrifying. This selection-oriented style prevents the user from accidentally Thanos snapping their system.
More examples
# Randomly delete a single file on your computer.
$ lots -n1 | rm
# Randomly print the basename of 32% of your elephant photos.
$ lots -p32 ~/Pictures/elephants/ | xargs --max-args 1 basename