Wolfram Function Repository
Instantuse addon functions for the Wolfram Language
Function Repository Resource:
Remove all elements from the value of a symbol that match a pattern and reset the symbol to the result
ResourceFunction["DeleteCasesFrom"][x,pattern] removes all elements of the value of x that match pattern and resets x to the result. 

ResourceFunction["DeleteCasesFrom"][x,pattern,levelspec] removes all parts of the value of x on levels specified by levelspec that match pattern and resets x to the result. 

ResourceFunction["DeleteCasesFrom"][x,pattern,levelspec,n] removes the first n parts of the value of x that match pattern and resets x to the result. 
Set s equal to a list:
In[1]:= 

Out[1]= 

Delete cases that match integers:
In[2]:= 

Out[2]= 

The value assigned to s has changed:
In[3]:= 

Out[3]= 

Delete elements from an Association:
In[4]:= 

Out[4]= 

In[5]:= 

Out[5]= 

DeleteCasesFrom can access parts of the elements of an Association:
In[6]:= 

Out[6]= 

In[7]:= 

Out[7]= 

Deleting elements from a nested Association:
In[8]:= 

Out[8]= 

In[9]:= 

Out[9]= 

Delete elements matching an Association from a list:
In[10]:= 

Out[10]= 

In[11]:= 

Out[11]= 

Delete elements from a list matching a condition:
In[12]:= 

Out[12]= 

In[13]:= 

Out[13]= 

In[14]:= 

Out[14]= 

Deleting the head f effectively flattens the expression:
In[15]:= 

Out[15]= 

In[16]:= 

Out[16]= 

Deleting the head effectively flattens the expression:
In[17]:= 

Out[17]= 

In[18]:= 

Out[18]= 

Deleting the head in an Association removes the entry:
In[19]:= 

Out[19]= 

In[20]:= 

Out[20]= 

Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License