SharePoint storage

Free up SharePoint storage by finding and removing inactive files

Find inactive SharePoint files, review them safely with content owners, and decide whether to delete or archive them before reclaiming storage.
Scott Ortlepp
Updated
August 18, 2026
4 min to read

Answer in brief

Inactive SharePoint files can consume storage, clutter search results and expose users to outdated information, but inactivity alone does not mean a file should be deleted. First identify files that have not changed within an agreed period, then review their size, ownership, business value and retention requirements before taking action.

A safe inactive-file cleanup process should:

  • Prioritise inactive files that consume meaningful storage.
  • Confirm whether the content still has an owner or business purpose.
  • Check applicable retention, legal and compliance requirements.
  • Decide whether each file should remain active, be archived or be deleted.
  • Record owner approval before performing bulk cleanup.
  • Validate the storage reclaimed after the action.

If you need a broader sequence covering inactive sites, large files, version-heavy files and inactive content, use the SharePoint cleanup checklist for IT admins before beginning file-level cleanup.

What is an inactive file?

Files are considered to be inactive when they have not been modified for an extended period of time, for example: 1, 2, or 3 years. It is worth noting that, in some cases, even when a document is inactive for an extended period of time, it may still be relevant to the business (possibly for regulatory or reference purposes). Like most cleanup activities, archiving of inactive files should be planned and considered before it's executed, but most inactive files are safer to archive than you might think.

Why are inactive files an issue?

Inactive files are problematic for several reasons, particularly in workspaces where collaboration is important. Here are a few of the areas where inactive files can cause issues:

  1. Storage costs – Inactive files increase storage expenses without any benefit; removing them reduces costs.
  2. Information overload – They clutter libraries, making the latest relevant information harder to find and searches less effective.
  3. Old/outdated information – These files can spread outdated or incorrect details within the business.
  4. Copilot readiness – Inactive files are less likely to be relevant to current operational activities, and having them clutter the references and reasoning of Copilot is counter-productive.

If most content in a site is inactive, it’s usually faster to treat it as an inactive site (archive/delete) than file-by-file cleanup.

What are the options to clean up inactive files?

Before choosing an action, confirm that the file is genuinely inactive and understand why it remains in SharePoint. A file that has not been modified recently may still support regulatory, contractual, historical or operational needs. Start with inactive files that are also large, because they offer the clearest storage opportunity after review.

Deleting

Delete an inactive file only when it is no longer required for a legitimate business purpose and its disposal has been approved. Before deletion, confirm the applicable retention requirements, check whether another copy is the recognised record, and obtain approval from the content owner or responsible business area.

If you are unsure whether stale content should be removed or retained outside the active workspace, use the When to delete SharePoint files instead of archiving them decision guide before taking irreversible action.

Archiving

In situations where most or all files in a SharePoint site are inactive, archiving the entire site may be the easiest and most time and cost-effective approach. For more information about site archiving, see How to reduce SharePoint storage costs by archiving sites.

When a site contains a large percentage of inactive files (or simply a mix of active and inactive files) but the site needs to remain accessible and usable, archiving individual files is the most sensible option. This will free up storage and reduce clutter without disturbing ongoing work. See our post about file-level archiving.

How to find and remove inactive files – use the SharePoint UI

Finding inactive files in a SharePoint library

To find inactive files in a SharePoint library, you can simply order the library view by Modified – Older to newer.

*Note: you can also create a view that ignores folders, but you may run into list view threshold issues, as discussed in our article Why large lists cause issues in SharePoint.

Finding inactive files using SharePoint search

To find inactive files via SharePoint search, simply use the following KQL (Keyword Query Language) query:

LastModifiedTime<2024-12-01

*Note: the date format used is YYYY-MM-DD

Removing inactive files from a SharePoint library

To remove the files from the library view, you can simply select the file or files and select Delete.

Advantages

  • Always available – Users are able to perform these actions at any time.
  • No admin privileges required – Any user with the correct owner or member access will be able to perform these actions.

Disadvantages

  • Recycle bin – Items deleted using this method still go through the recycle bin process and until that process is completed, they still count towards the storage quota for your site.
  • Manual – This is a time intensive, manual action that multiple users need to perform within sites they have access to.
  • Bulk actions – Bulk actions are limited to what you can select, including deleting a folder and all files inside that folder.

How to find and remove inactive files – use PowerShell

Find inactive files with PowerShell

To find inactive files in PowerShell, you need to connect to the desired site and query the library where you believe there may be inactive files with the following:

Get-PnPListItem -List "<Library Name>" | Where-Object { $_["Modified"] -lt <Inactive Date>}

This will return all files in the library that have a modified date before your given date.

*Note: In this example, we get the $Date variable with the following:

$Date = (Get-Date).AddYears(-1)

To get a CSV report of all inactive files, download the PowerShell script: Report on InactiveFiles.ps1

Remove inactive files with PowerShell

To remove inactive files use the following command:

Remove-PnPFile -ServerRelativeUrl <Server Relative URL> -Recycle:$false -Force

Caution: This will remove the inactive file permanently without first sending it to the recycle bin, and will not prompt for confirmation.

To remove inactive files in bulk, you can either remove all files modified before a certain date or remove files from within the CSV report.

Remove Inactive files modified before a date

$InactiveFiles = Get-PnPListItem-List "<Library Name>" | Where-Object {$_["Modified"] -lt  <Inactive Date>}

ForEach($InactiveFile in $InactiveFiles)

{

Remove-PnPFile -ServerRelativeUrl $InactiveFile.FieldValues.FileRef -Recycle:$false -Force

}

*Note: this method is not recommended as this does not allow you to review the files before deletion.

Remove inactive files in CSV report

Once the CSV report generated in Report on Inactive Files.ps1 has been reviewed by the relevant users, you can download and run the following PowerShell script: Remove Inactive Files.ps1

Advantages

  • Recycle bin – This process will skip the recycle bin and immediately free up storage capacity.
  • Time saving – By enabling bulk actions, you can reduce the amount of time needed to process.

Disadvantages

  • Admin intensive – This requires an admin with knowledge of PowerShell to generate the report and delete the required files.
  • Limited scope – Each library will need to be reported on individually and reviewed by the relevant users before the deletion script can be run.
  • User interface – CSV files are not user friendly and require conversion to and from .XLSX format if you want to add formatting to the reports for your users.

Find inactive files across active SharePoint sites

Reviewing libraries one at a time makes it difficult to see where inactive content creates the greatest storage opportunity. SProbot helps you identify sites with high counts or percentages of inactive files, review detailed results and export the findings for owners before taking action.

How to find and remove inactive files – use SProbot

Finding inactive files in SProbot

To find inactive files in SProbot, you can either navigate to a specific site you'd like to clean up, or if you don't know which sites contain inactive files you can use the Workspaces with most inactive files review.

This will give you a list of sites with the most inactive files (or the highest percentage of inactive files).

Screenshot of the SProbot "Sites with many inactive files" review displaying sites with a high percentage of inactive files

Opening a specific site's Content tab displays the number of files last modified more than 1 year ago (you can also view the large file report).

Screenshot of the Content tab inside a site, showing the number of inactive files with the ability to run a detailed report

Running a detailed report gives you a full list of all inactive files matching the threshold (1, 2 or 3 years) and then enables you to:

  • Search within the results set
  • Filter according to last modified date, editor, extension and minimum size
  • Export the results to CSV

Removing inactive files in SProbot

Using SProbot, you can either remove files in bulk or individually.

Simply select the file(s) you want to delete and use Cleanup > Delete.

Advantages of using SProbot

  • Automatic identification - The system automatically counts inactive files and highlights sites with the highest counts so that you do not need to run reports on hundreds of individual sites.
  • User friendly – The report interface is user friendly and easy to understand.
  • Time saving – Being able to perform the actions in bulk reduces the time needed to remove inactive files.
  • Space saved – SProbot lets you know how much space each cleanup action will save.

Should you delete, archive or keep inactive files?

The modified date tells you that a file has not changed, but it does not reveal whether the file still matters. The correct action depends on business value, ownership, retention requirements, future access needs and whether the content belongs in the active collaboration environment.

Delete inactive files when

Deletion is appropriate only after the relevant checks are complete. Typical candidates include duplicate, test-related, trivial, non-work-related or superseded files that have no remaining business value and have been approved for disposal.

Archive inactive files when

Archiving is safer when the content may still have business, legal, historical or reference value, but it no longer needs to remain in active SharePoint collaboration. Confirm how authorised users will find and restore archived content before moving it.

Retain inactive files when

Files should be retained when they still support current work, are needed in their existing context or are governed by a requirement that makes relocation inappropriate. Low editing activity does not necessarily indicate low usage or low value.

🔗 For a more detailed decision framework, see When to delete SharePoint files instead of archiving. If storage pressure involves more than inactive files, have a look at How to get a SharePoint Online Health Check.

Conclusion

Inactive-file cleanup can reclaim SharePoint storage and reduce clutter, but the safest process separates identification from disposal. Report first, prioritise high-impact candidates, involve content owners, check retention requirements and then choose whether to keep, archive or delete each item.

SharePoint UI and PowerShell methods remain useful for targeted work. For a tenant-wide programme, central reporting and exportable review data can make ownership decisions more manageable. Use our SharePoint cleanup checklist for IT admins to understand inactive-file review within the wider cleanup sequence.

Turn inactive-file findings into a controlled cleanup review

Start a 14-day SProbot trial to identify inactive files across your tenant, filter the detailed results and export reports for owner review before cleanup.

FAQ

What is an inactive file in SharePoint?

An inactive SharePoint file is a file that has not been modified for an agreed period, commonly one, two or three years. The threshold identifies files for review. It does not prove that they are obsolete or safe to delete.

Is it safe to delete all SharePoint files older than a set date?

No. Age or last-modified date alone is not enough to justify deletion. Confirm ownership, business value, retention requirements and approval first. A date threshold should create a review list, not automatically determine the outcome.

Should inactive SharePoint files be deleted or archived?

Delete a file when it is genuinely unnecessary and approved for disposal. Archive it when it still has business, legal, historical or reference value but no longer needs to remain in active collaboration. Keep it active if users still require it in context.

How can I find inactive files across multiple SharePoint sites?

You can inspect libraries individually, use SharePoint search or run PowerShell reports. A tenant-wide reporting tool like SProbot can reduce manual work by identifying sites with high inactive-file counts and presenting detailed results for filtering and export.

Do deleted SharePoint files free storage immediately?

The outcome depends on the deletion method and whether items remain in a recycle bin. Files deleted through the SharePoint interface continue through the recycle-bin process, while PowerShell can bypass this process and permanently removes files.

Can a file be inactive but still important?

Yes. A contract, policy, project record or historical reference may remain important even when it has not been modified recently. That is why inactivity should be combined with owner, value and retention checks before any action.

Need to reduce SharePoint storage costs?
Use SProbot to find and deal with redundant, obsolete and trivial content on your tenant

See how SProbot can help you cut storage costs

We'll show you how to save on storage, tame content sprawl, and improve security.

Get a demo