Skip to content

Instantly share code, notes, and snippets.

@dive
Created January 29, 2012 20:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dive/1700407 to your computer and use it in GitHub Desktop.
Save dive/1700407 to your computer and use it in GitHub Desktop.
open Skype DB with history and remove some items (Mac OS)
# shutdown Skype
# Skype username - it's a login at Skype
# Mac username - it's a short username of Mac OS X (ex.: dive)
# <...> should be entered without brackets <>
#copy this one, paste to Terminal.app and hit Enter
sqlite3 "$HOME/Library/Application Support/Skype/<your_skype_username>/main.db"
#then copy this one, paste to Terminal.app where sqlite3 running and hit Enter
delete from Messages where dialog_partner = '<delete_history_of_conversation_with_particurarly_username>';
#done
#if you want to remove history with another username, just hit Up arrow and replace username
@arturdryomov
Copy link

Может, на седьмой строке Application\ Support? Или у меня просто линукс головного мозга?

@dive
Copy link
Author

dive commented Jan 29, 2012

не. в двойных кавычках же.

@arturdryomov
Copy link

Ах да, я лох.

@nguyenduy020290
Copy link

nguyenduy020290 commented Oct 25, 2017

This is my script, firstly close Skype, then all message in a conversation. You can adjust the sql query according to your purpose.

  1. Create a file and paste below content, save it with .sh extension
  2. Edit skype_login_name to yours, adjust the sql query according to your purpose then save the file
  3. Execute the script in terminal
SkypePid=$(pgrep Skype)
kill $SkypePid
sqlite3 "$HOME/Library/Application Support/Skype/<skype_login_name>/main.db" <<EOS
delete from main.messages where chatname = '19:83e9be70b7ec4202ae8c158527374401@thread.skype';

commit;

.exit

EOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment