Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to delete logs from _Default Sink

I have started using google cloud recently, especially Vertex AI and the Gemini API. When I started, I also looked around at  some things like Colab Enterprise and Ray on Vertex AI, I had set up Ray to see what it was but forgot to turn it off. I understand that is my fault, but now I am being charged $10 an hour since it had generated 182.01GiB worth of logs in my _Default Sink

Sweaterdog_0-1750384088690.png

 

I have tried many ways to fix this, like running gcloud commands and even help from Gemini, but hours later I am still being billed, and the data is still there!

This was one of the commands I had ran in the Cloud Shell:

gcloud logging logs list --format="value(NAME)" | grep -v "cloudaudit.googleapis.com" | xargs -n1 gcloud logging logs delete --quiet

I have also added exclusions for the bucket to stop saving logs after I deleted all of them, and even disabled the sink.

I would love an answer before all of my credits are gone!

0 1 42
1 REPLY 1

Hi,

you can’t delete it, but you can exclude logs from being stored but you can add exclusion filters in order to exclude noisy logs, and you can also add retention policy to indicate how longer must be stored before being deleted, even delete large logs manually if they’re not needed.

Top Labels in this Space