Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safaricleanup

Safaricleanup is a command line utility for clearing Safari’s browsing history, cache and cookies.


## Installation
  1. Download the zip file.
  2. Extract it and copy safaricleanup into your PATH (e.g. /usr/local/bin).

## How I use it: automatically clear (some) cookies when quitting Safari
### 1. Create an Automator workflow

Open Automator and select “Service” from the menu.

Create an Automator workflow


### 2. Configure the service

At the top of the new document, set the options to “no input” and “Safari.app”.

Configure the service


### 3. Add the “Quit Application” action

Drag the “Quit Application” action into the document and choose “Safari.app” from the drop-down menu in the action.

Add the “Quit Application” action


### 4. Add the “Run Shell Script” action

Drag a “Run Shell Script” action, and paste in the following: /usr/local/bin/safaricleanup -s -c -t -k --only=facebook.com,twitter.com
See safaricleanup -h for the full list of options.

Add the “Run Shell Script” action

Hit Save and name the service something like “Clear Data and Quit Safari”.


### 5. Remap the “Quit Safari” menu item
  1. Go to System Preferences > Keyboard > Shortcuts.
  2. Choose “App Shortcuts” in the sidebar.
  3. Click the “+” button.
  4. Set it to “Safari.app” and enter “Quit Safari” (it’s case sensitive) as the Menu Title.

5. Remap the “Quit Safari” menu item


### 6. Map Cmd-Q to the newly created service
  1. In the Keyboard Shortcuts preference pane, choose “Services” in the sidebar.
  2. Find the newly created service and then double-click to the right of it.
  3. Set the shortcut and press return. Make sure it’s checked.

Map Cmd-Q to the newly created service

About

A command line utility for clearing Safari’s browsing history, cache and cookies. (Not Working in El Capitan)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages