We have moved to a new Sailfish OS Forum. Please start new discussions there.
9

[fixed in 1.0.3.8] How to delete many/all contacts (from People app)? [answered]

asked 2014-01-04 17:30:38 +0300

hlub gravatar image

updated 2014-02-02 01:01:25 +0300

I accidentally imported almost 10000 vCards, which works OK but results in a rather unwieldy contacts list.

I then removed all contacts using sqlite3:

[root@jolla] > sqlite3 /home/nemo/.local/share/system/privileged/Contacts/qtcontacts-sqlite/contacts.db
> DELETE from Contacts; -- DON'T do this!

This is not a good idea: contactsd and voicecall-ui started to use a lot of processor time (also afer reboot), and the Contacts app became very unresponsive

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by hlub
close date 2014-02-02 01:06:21.170230

Comments

Just curious:

  1. How did you accidentally delete 10000 vCards? It's hard enough to delete one :D
  2. Why would you keep 10000 contacts on your phone? It's not exactly meant as a mailinglist server.
Tanghus ( 2014-01-04 19:40:52 +0300 )edit
1

I think this is allready some where in here. but would love a option to multiple select contacts in people app and be ablr to delete them

teun ( 2014-01-04 20:02:15 +0300 )edit

@teun Wrong app :P sry

Tanghus ( 2014-01-04 20:20:13 +0300 )edit

Lol .. but the functionality from mail should be available for contacts

teun ( 2014-01-04 23:33:51 +0300 )edit

2 Answers

Sort by » oldest newest most voted
8

answered 2014-01-14 11:42:05 +0300

hlub gravatar image

updated 2014-01-14 15:25:05 +0300

Renaming (or removing) the directory qtcontacts-sqlite solved the problem without any apparent negative consequences - the directory and the (empty) database files are instantly re-made.

This is how I did it:

[nemo@jolla] > devel-su
Password: 
[root@jolla] > cd /home/nemo/.local/share/system/privileged/Contacts
[root@jolla] > mv qtcontacts-sqlite qtcontacts-sqlite.backup # move but keep backup

This removes all Contacts, if you want to remove many, but not all, the best way would be to export the content of contacts.db using vcardconverter -e jollacontacts.vcf, edit jollacontacts.vcf by hand (or with a vCard editor), remove all contacts, and then re-import the list of vCards by moving it to ~/Downloads.

edit flag offensive delete publish link more

Comments

Yes, good answer!

foss4ever ( 2014-01-14 11:44:37 +0300 )edit

@hlub, I've edited your answer with the export command, don't do perl script for that ;-)

CsTom ( 2014-01-14 13:28:49 +0300 )edit

@CsTom: excellent! I edited the answer a bit tomake it shorter and clearer.

hlub ( 2014-01-14 13:43:45 +0300 )edit

One thing to remember, that this exports only the "local" content. Google and Facebook (and possibly other synced) contacts won't be exported. But those will be synced again anyway once the respective service wakes up.

(Now what will happen when the Google sync will be two-way [currently read only], that's an other story, but be aware :-) )

CsTom ( 2014-01-14 13:50:56 +0300 )edit
1

If you plan to try this for any reason, you should first do:

systemctl --user stop msyncd.servicesystemctl --user stop contactsd.servicesystemctl --user stop voicecall-ui-prestart.service

Otherwise, these processes could be making concurrent database modifications which result in database corruption.

MattVogt ( 2014-01-15 08:16:18 +0300 )edit
4

answered 2014-02-02 01:03:43 +0300

hlub gravatar image

updated 2014-02-02 01:07:35 +0300

Deleting all contacts is possible since 1.0.3.8 (Naamankajärvi): Settings -> Apps -> People-> (pull down:) delete all contacts

edit flag offensive delete publish link more

Comments

Note that this process will in fact delete all contacts stored in the device itself, not those that are synchronized from some external source.

MattVogt ( 2014-02-02 09:30:51 +0300 )edit

Question tools

Follow
3 followers

Stats

Asked: 2014-01-04 17:30:38 +0300

Seen: 2,249 times

Last updated: Feb 02 '14