Hi @ALVES Ricardo ,
To clarify, in SharePoint server
Site Recycle Bin (First-Stage) = 30 days
Reference: https://learn.microsoft.com/en-us/sharepoint/sites/delete-and-restore-site-collections
If you want to change the number of days, just change the configuration of the SharePoint web application recycle bin and you have changed all the sites.
Powershell code:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Get the Web Application
$WebApp = Get-SpWebApplication "http://sp16"
#*** Set Recycle bin Options ***
#Enable Recycle bin
$WebApp.RecycleBinEnabled = $true
#Set Retention Period to 30 days
$WebApp.RecycleBinRetentionPeriod = 30
#To Turnoff Recycle bin Retention, use: $WebApp.RecycleBinCleanUpEnabled=$false
#Set Second Stage Recycle bin Quota %
$WebApp.SecondStageRecycleBinQuota = 30
#To turn OFF Second Stage recycle bin, use: $WebApp.SecondStageRecycleBinQuota = 0
#Apply the changes
$WebApp.Update()
Write-Host "Recycle bin Settings Updated!"
You can directly change the number of days or view the powershell running results through the following path.
Reference: https://support.microsoft.com/en-us/office/configure-sharepoint-recycle-bin-settings-427bf749-cfb4-4b5a-80aa-3bd2b24ef4f0#:~:text=Choose%20the%20site%20you%20want,under%20Manage%20on%20the%20ribbon.&text=Under%20Recycle%20Bin%20Status%2C%20select,turned%20on%20or%20turned%20off.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.