This sends a delete request to all relays that have your data. This is a best effort and will likely not work well enough to actually delete everything, or possibly anything. A lot of relays do not respect delete requests.
- First download a list of relays:
curl -o relays.json https://api.nostr.watch/v1/online
-
Now compile nostr-tool (compiling is required because of recent changes I made that are not released yet).
-
Run the script below, replacing
{NSEC}
with your nsec.
# Read the JSON file and extract URLs into an array
mapfile -t urls < <(jq -r '.[]' relays.json)
# Loop through each URL in the array and execute the command in the background
while true; do
for url in "${urls[@]}"; do
nostr-tool -r "$url" -p {NSEC} delete-profile --events-only --kinds 1 --kinds 4 --kinds 6 --kinds 7 --kinds 1984 --kinds 9734 --kinds 9735 --kinds 30311 --kinds 1311 --kinds 30023 --kinds 30078 --kinds 1063 --timeout 60 &
done
# Wait for all background processes to complete
wait
echo "Starting new loop iteration..."
sleep 10
done
- Give permissions
chmod +x script.sh #or whatever you named it
- Run
./script.sh
Depending on how many notes you have, this may take awhile. It won't be perfect but its an attempt. Check your profile on a few nostr clients to see if it's done a good enough job (make sure to delete cached data otherwise events may still be there).