Skip to content

Support deleting data by source for types with no delete operation #8

Description

@yashwalankar

Problem

I synced Apple Health data into Google Health via the Google Health app on iPhone. I've since disconnected that, but the historical data it wrote is still present for read-only types like heart-rate, steps, distance, oxygen-saturation, etc. — types that currently only support list, rollup, daily-rollup, and reconcile.

Right now there's no way to:

  • Delete all data points that came from a specific source (e.g. "Apple Health"), across any data type.
  • Delete an individual data point/record by ID for types outside the current writable set (exercise, sleep, weight, body-fat, height).

Disconnecting the source in account settings stops new data from syncing, but doesn't retroactively remove what was already written — and today there's no CLI/API path to clean up the backlog short of a full account-level data deletion request, which is far more destructive than intended.

Requested feature

  1. Bulk delete by source, e.g.:
   ghealth data <type> delete --source "Apple Health"
   ghealth data <type> delete-all-by-source --source "Apple Health"  # across all deletable types

Should support --dry-run to preview the count/IDs that would be deleted before committing.

**OR **

  1. Individual delete by ID for currently read-only types, e.g.:
   ghealth data heart-rate delete --ids <id>

extending delete support beyond the current 5 writable types, provided the underlying Google Health API allows point-level deletion for that type.

Why this matters

Switching health-tracking devices/apps is common, and users reasonably expect to be able to remove a disconnected source's historical data without deleting everything or filing an account-wide data request. A source-scoped or ID-scoped delete keeps data from sources still in use intact while cleaning up the rest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions