Skip to content

Instantly share code, notes, and snippets.

@vitali2y
Created March 30, 2022 19:37
Show Gist options
  • Save vitali2y/ff9e498f395f8295723727efe3da62c6 to your computer and use it in GitHub Desktop.
Save vitali2y/ff9e498f395f8295723727efe3da62c6 to your computer and use it in GitHub Desktop.
Chromium web browser's recover steps @ Linux

Chromium recover @ Linux

Exporting Chromium browsing history to TXT

➜  ~ echo "SELECT title, datetime(last_visit_time/1000000 + (strftime('%s', '1601-01-01')),'unixepoch') last_visit_time, url from urls WHERE DATETIME (last_visit_time/1000000 + (strftime('%s', '1601-01-01')), 'unixepoch') >= DATETIME('now', '-3652 days') group by title, last_visit_time order by last_visit_time" | sqlite3 ~/.config/chromium/Default/History > ./chromium-history-$(date +%y%m%d%H%M).txt 
➜  ~ ls -la ./chromium-history-*.txt
-rw-rw-r-- 1 vit vit 4393191 Mar 30 21:50 ./chromium-history-2203302150.txt
➜  ~

Useful info

~/.config/chromium/Default/Bookmarks - Chromium's bookmarks in JSON format

Removing installed Chromium, backing up all stuff, reinstalling Chromium from the scratch

➜  ~ ps -fe | grep chromium | awk '{ print $2 }' | xargs kill -TERM 
➜  ~ sudo apt purge --remove chromium -y && sudo apt autoremove && sudo apt autoclean -y
➜  ~ mv ~/.config/chromium{,-$(date +%y%m%d%H%M)}
➜  ~ mv ~/.cache/chromium{,-$(date +%y%m%d%H%M)} 
➜  ~ sudo apt install chromium -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment