Automater or Apple script to Auto-delete web/chat history?

Discussion in 'Mac Programming' started by Jasoneskin, Nov 27, 2016.

  1. Jasoneskin macrumors newbie

    Dec 27, 2007
    Hello! Im trying to figure out how to write a very simple apple script or automater task that when run, will automatically clean my Web history, iMessage history, and delete chat transcripts from my other chat app Adium. I know this can't be difficult. It's essentially a script that will permanently (skipping trash can) delete several log files.

    Additionally, looking for it to be accessible when double clicked AND, if I choose, each time I start my computer. Anyone know an easy script that exists for this?

  2. vmachiel macrumors 68000

    Feb 15, 2011
    I don't know anything about apple script or automator. Look into a simple python script that deletes all the files that store those things.
  3. kepgnar macrumors newbie


    Dec 30, 2015
    you should be able to do that with a standard shell script...

    I'm not much of a scripter, but:


    sudo rm -rf /path/to/iMessage history
    sudo rm -rf /path/to/safari history

    save as "" or whatever your preference is.

    then do "chmod a+x" from terminal to make it executable.

    you can run from terminal using "./" OR you can do "get info" and set it to open with Terminal.

    from there you could add to login items maybe, or turn it into an Automator application. Also, as far as trying to add a password to the script to make it completely unattended, that's a different debate.

    I'm a noob at this, and it's off the top of my head, so there's prob a more elegant solution, but that's what I would do.

Share This Page