Delete history on exit in Chromium on Linux

Published (last updated )

  1. chose directory based on this doc: https://www.chromium.org/administrators/linux-quick-start chrome:

    cd /etc/opt/chrome/

    chromium:

    cd /etc/chromium/

    however on my ubuntu:

    cd /etc/chromium-browser/
mkdir -p policies/managed
cd policies/managed

become su:

sudo -i
  1. Just edit a new or existing json file (e.g. custom_policy.json) and add the key-value pair: {"SavingBrowserHistoryDisabled" : true}

    vim custom_policy.json

    3 Alternatively from the command line:

    [ -f custom_policy.json ] || echo "{}" > custom_policy.json
    jq '.SavingBrowserHistoryDisabled = true' custom_policy.json|sponge custom_policy.json
  2. remove write permission (otherwise it wont’ work.)

    chmod -w custom_policy.json
    chmod go-w .