Advertisement
metalx1000

Delete Holidays from Android Calendar

Jan 20th, 2025
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. # delete all imported holidays from Android Calendar
  2.  
  3. # set database - this will change depending on which app you use
  4. db="/data/data/org.fossify.calendar/databases/events.db"
  5.  
  6. #backup original db
  7. cp $db /sdcard/events_$(date +%Y-%m-%d).db
  8.  
  9. # list calendars
  10. sqlite3 $db "select source from events" |sort -u
  11.  
  12. # Holidays will be under 'imported-ics'
  13. # check and make sure that is only holidays
  14. sqlite3 $db "select title from events where source='imported-ics'"
  15.  
  16. # once confirmed, delete all events from that calendar
  17. sqlite3 $db "DELETE FROM events WHERE source='imported-ics'"
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement