Getting Data In

How to delete sourcetype or source ?

vita86
Explorer

Hello, 

I added a file csv in splunk but the name is not correct for sourcetype. And i want to restart. 

now : 

source="test.csv" sourcetype="csv"

I will want : 

source="test.csv" sourcetype="test"

If i do this query, it's correct ? 

source="test.csv" sourcetype="csv" | delete 

it will delete test.csv file please ? 

thanks in advance. 

Regards,

Viat

 

Labels (1)
0 Karma

vita86
Explorer

Thanks for your reply. 

I have this error message : 

Error in 'delete' command: You have insufficient privileges to delete events.

How can I do please ? 

Thanks in advance

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Yes, you have to contact your splunk admin and get your user updated with more privileges /  capabilities . 

as your query is resolved, please accept @to4kawa 's answer as solution. thanks. karma points appreciated!

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

isoutamo
SplunkTrust
SplunkTrust
Actually there is no need to delete those events. Just load those again with correct source and sourcetype and then always use those in queries.
r. Ismo
0 Karma

to4kawa
Ultra Champion

Please ask your administrator for help.

0 Karma

to4kawa
Ultra Champion
source="test.csv" sourcetype="csv" | delete 

That's correct. 

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...