<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I delete from the 'main' index in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371751#M67472</link>
    <description>&lt;P&gt;I have a standalone instance of Splunk Enterprise.&lt;BR /&gt;
I uploaded a few XML files to perform some testing and now I want to delete the files from the index.&lt;BR /&gt;
Logged in as admin, I created a user with the role of "can_delete"&lt;BR /&gt;
I logged in as that user and ran the search to locate the events. My search is "index=main source=*xml". The events appear in the output on the events tab. &lt;BR /&gt;
I then append " | delete" to the search and I get an error message saying that the events could not be deleted and &lt;BR /&gt;
"You do not have the capability to delete from index=main"&lt;/P&gt;

&lt;P&gt;I have performed this operation successfully before. Not sure why it isn't working now.&lt;BR /&gt;
I've gone back and tried adding roles to the user, deleting and recreating the user. Nothing works.&lt;BR /&gt;
Any suggestions?&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2017 17:56:54 GMT</pubDate>
    <dc:creator>lstewart_splunk</dc:creator>
    <dc:date>2017-08-16T17:56:54Z</dc:date>
    <item>
      <title>How do I delete from the 'main' index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371751#M67472</link>
      <description>&lt;P&gt;I have a standalone instance of Splunk Enterprise.&lt;BR /&gt;
I uploaded a few XML files to perform some testing and now I want to delete the files from the index.&lt;BR /&gt;
Logged in as admin, I created a user with the role of "can_delete"&lt;BR /&gt;
I logged in as that user and ran the search to locate the events. My search is "index=main source=*xml". The events appear in the output on the events tab. &lt;BR /&gt;
I then append " | delete" to the search and I get an error message saying that the events could not be deleted and &lt;BR /&gt;
"You do not have the capability to delete from index=main"&lt;/P&gt;

&lt;P&gt;I have performed this operation successfully before. Not sure why it isn't working now.&lt;BR /&gt;
I've gone back and tried adding roles to the user, deleting and recreating the user. Nothing works.&lt;BR /&gt;
Any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 17:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371751#M67472</guid>
      <dc:creator>lstewart_splunk</dc:creator>
      <dc:date>2017-08-16T17:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete from the 'main' index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371752#M67473</link>
      <description>&lt;P&gt;Is the new user inheriting both the admin role as well as the can_delete role? Try restarting Splunk after updating the user's roles. You shouldn't have to restart, but maybe you've encountered a bug that is preventing the role's permissions from updating...&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 23:59:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371752#M67473</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2017-08-16T23:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete from the 'main' index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371753#M67474</link>
      <description>&lt;P&gt;Hi lstewart [Splunk],&lt;BR /&gt;
I had the same problem last year with _internal index,  there is a restriction of the delete command. &lt;BR /&gt;
Howevers, starting 6.5.x, there is a new attribute in town for roles called 'deleteIndexesAllowed' (see &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/admin/authorizeconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/admin/authorizeconf&lt;/A&gt; ).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;deleteIndexesAllowed = &amp;lt;string&amp;gt;
* Semicolon delimited list of indexes this role is allowed to delete
* This setting must be used in conjunction with the delete_by_keyword
  capability
* Follows the same wildcarding semantics as srchIndexesDefault
* Defaults to none
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The semantics of the values is same as 'srchIndexesDefault' &lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;put in $SPLUNK_HOME/system/local/authorize.conf (if it doesn't exist, create it) and restart Splunk&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [role_can_delete]
 deleteIndexesAllowed = *;main
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 07:35:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371753#M67474</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-17T07:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete from the 'main' index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371754#M67475</link>
      <description>&lt;P&gt;This worked for me.  Once I added deleteIndexesAllowed to my authorize.conf and restarted Splunk, I was able to remove the data I wanted. &lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 18:04:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371754#M67475</guid>
      <dc:creator>rgreer</dc:creator>
      <dc:date>2018-04-06T18:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete from the 'main' index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371755#M67476</link>
      <description>&lt;P&gt;Hi lstewart [Splunk],&lt;BR /&gt;
If you're satisfied by this answer, please accept and/or upvote it.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 11:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371755#M67476</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-07-10T11:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete from the 'main' index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371756#M67477</link>
      <description>&lt;P&gt;You did the correct think to inherit role can_delete and admin capabilities. &lt;BR /&gt;
Maybe the changes did not go in memory so try this:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Go in $SPLUNK_HOME/bin&lt;/LI&gt;
&lt;LI&gt;From the terminal/console on the SH:             ./splunk reload auth (for windows .\splunk reload auth)&lt;/LI&gt;
&lt;LI&gt;pipe the delete command on your search &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;This command reloads the authorizations of splunk.&lt;BR /&gt;
Let me know if that worked, and give me a upvote if you find this &lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 12:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/371756#M67477</guid>
      <dc:creator>sonny_monti</dc:creator>
      <dc:date>2019-07-10T12:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I delete from the 'main' index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/577801#M102060</link>
      <description>&lt;P&gt;Just replying here in case anyone else stumbles upon this and can't find the same folder, click on the documentation link!&lt;/P&gt;&lt;P&gt;The updated path is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$SPLUNK_HOME/etc/system/local/&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 18:01:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-delete-from-the-main-index/m-p/577801#M102060</guid>
      <dc:creator>sam_indeed</dc:creator>
      <dc:date>2021-12-08T18:01:14Z</dc:date>
    </item>
  </channel>
</rss>

