SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is recycle bin a list? And can we query recycle bin to get items deleted from a list,if so how to do it? And also where is the recycle bin data actually stored, is it stored in the content db ?

share|improve this question

No, Recyle bin is not a List like other document library and lists. Yes you can Query Recyle Bin item like SPWeb.GetRecycleBinItems Method

All files are internally stored in Content DB in Sharepoint. Once it is Deleted permanently from Sharepoint, they it will be deleted from Content DB.

share|improve this answer

No it is not a list, it's work on the same concept as we have in windows.

yes you can access it via powershell or other ways. here is powershell example.

# recycle bin's are tied to a site collection so we need a site collection object

$site = get-spsite

#we can see everything in the recycle bin like this:

#unfortunately, the above command dumps quite a lot to the screen.
#fortunately, we can pipe the output to other commands for filtering and cleanup.

#This command will return all the webs in the recyclebin
$site.Recyclebin | where {$_.itemtype -eq "web"}

#we can build on this by adding a sort statement, 
#here I sort by dirname, which is the URL path the item would have been at before it was deleted
$site.Recyclebin | where {$_.itemtype -eq "web"} | sort dirname

# we can format the output into a nice list
$site.Recyclebin | where {$_.itemtype -eq "web"} | sort dirname | select title, itemtype, dirname, itemstate

#note that in the above listing, itemstate shows which recycle bin it's in (FirstStageRecyclebin = End user Recycle Bin Items, SecondStageRecycleBin = Deleted from end user Recycle Bin)

#here's one more application of filtering to show everything that's not a page nor a list item

$site.RecycleBin | where { $_.itemtype -ne "file" -and $_.itemtype -ne "ListItem" } | sort dirname | select title, itemtype, dirname

In SharePoint everything stored into the Content Database, So all deleted items stored into the Content DB until permanently deleted from recycle bin.

share|improve this answer
Good answer. Please note that recycle bin has two levels, SPWeb and SPSite. Anyway, quering SPSite will return both. – ppatalong Jun 19 '14 at 20:40
Thanks @ppatalong - youe comment fixed my issue! – grisha Mar 6 '15 at 17:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.