Macrodroid Auto delete old WhatsApp backed up databases

This is just a simple Macrodroid auto delete old WhatsApp backed up databases. Obviously, to trim any older backed up databases so the phone memory usage (for WhatsApp folder) can be maintained low.

The script

find /storage/emulated/0/WhatsApp/Databases/ -type f -name '*.crypt12' -mtime +2 -exec rm {} \;

Explanation

  • First part is the path where the WhatsApp folder located. If invalid, use any file explorer to retrieve the path.
  • Second part -type is the file type, f stands for files.
  • Third part -name is limiting *.crypt12 files.
  • Fourth part -mtime gets how many days the files older then will be listed. +2 is for files older then 2 days.
  • Fifth part -exec executes a command. In this case rm is the command, {} gets the filelist and \; closes the command.

Some screenshots

macrodroid auto delete whatsapp db

macrodroid auto delete whatsapp db

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.