10.4: Manually clean Safari RSS articles

Aug 12, '05 09:45:00AM

Contributed by: gboudrea

Tiger only hintI was playing with my own RSS feed, changing titles and whatnot. When I was done, I found out that Safari could not remove the old RSS articles for my feed only! I had the choice to make them expire (I currently have that setting to remove old RSS articles to 'Never') or force the removal of all RSS articles for all the feeds I read daily. Not wanting to do either, I started looking for a way to remove specific articles from Safari's RSS database.

After some digging, I found out that Safari store the RSS information in a SQLite database found in ~/Library/Syndication. Here's the procedure I used to clean my Safari's RSS database of the articles I didn't want. In the Finder, browse to ~/Library/Syndication. Copy the file you find there (mine was called Database3) to your Desktop (as a backup).

Get a copy of SQLiteManager, close Safari, and start SQLiteManager. When asked What would you like to do?, answer Open A Database. Hit Command-Shift-G, enter ~/Library/Syndication, and open the file you see there. Click the Manage tab. In the first combo box, choose Sources and click the Query button. A list of all known RSS feeds is shown. Select a source you want to clean, and click the Remove button. Confirm the removal. Repeat until you removed all sources you wanted to clean.

Next, click the SQL tab, and enter the following query:

DELETE FROM Articles WHERE source_id IN 
(SELECT DISTINCT Articles.source_id FROM Articles 
LEFT JOIN Sources ON Articles.source_id = Sources.id 
WHERE Sources.id IS NULL)
Click the Execute button; this will remove all articles associated with the non-existent sources (the ones you just deleted). You're done! You can now close SQLiteManager and restart Safari.

You can also delete individual articles by browsing the Articles table in SQLiteManager. The trial version has a 50 results per query limit, so you won't be able to see more than 50 articles, unless you tweak the query setting at the top of the Manage tab. You can also delete a bunch of articles in one shot using appropriate SQL queries. Articles older than 2005-01-01 from the Apple Hot News feed, for example. Feel free to ask if you don't know SQL.

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050807205129688