The chrome-cookies are stored in a sqlite database file, the following script deletes all cookies from defined domains before starting chrome (sqlite3 package is required), furthermore the “local state” file will be deleted (contains some client information) and the UserAgent ID can be faked (eg Safari/WinXP, commented out) .
Maybe this script it’s useful to someone, just customize it to your needs and save it to /usr/bin
#!/bin/sh
#[email protected]
#CONFIG_DIR="$HOME/.config/google-chrome"
COOKIES_FILE="$CONFIG_DIR/Default/Cookies"
LOCAL_STATE_FILE="$CONFIG_DIR/Local State"#delete cookies containing one of that strings in domain-name before starting chrome
COOKIES_BLACKLIST=(
'google'
'microsoft'
'bing.com'
'yahoo'
)for (( i=0;i<${#COOKIES_BLACKLIST[@]};i++)); do
echo "delete from cookies where host_key like '%${COOKIES_BLACKLIST[${i}]}%';"
sqlite3 $COOKIES_FILE "delete from cookies where host_key like '%${COOKIES_BLACKLIST[${i}]}%';"
done#set AGENT_ID to fake the user-agent identification
#AGENT_ID="Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/522.11.3 (KHTML, like Gecko) Version/3.0 Safari/522.11.3"#rubbish
rm "$LOCAL_STATE_FILE"if [ -n "$AGENT_ID" ]; then
exec `google-chrome --user-agent="$AGENT_ID"`
else
exec google-chrome
fi
exit 0