This simple script enables you to delete one contact history from your Skype local database.
Let’s say your contact display name in Skype is ‘Roger G’.
I’m using vacuum statement to compact database, I believe it’s more secure that way.
import sqlite3 conn = sqlite3.connect('C:\\Users\\your_user_name\\AppData\\Roaming\\Skype\\skype_account_name\\main.db') c = conn.cursor() c.execute("SELECT DISTINCT convo_id FROM Messages WHERE from_dispname = 'Roger G';") result = c.fetchone() if result is not None: convo_id = int(result[0]) c.execute("DELETE FROM Messages where convo_id = {}".format(convo_id)) deleted = int(conn.total_changes) print("Deleted: {}".format(deleted)) c.execute("VACUUM;") print("Vacuumed...") conn.close() print("Finished")