• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Ubuntu / Find And Delete Files In Linux Older Than 30 Days

Find And Delete Files In Linux Older Than 30 Days

By Sourabh / October 7, 2023 Category: How To, Ubuntu

How to find and delete files in Linux older than 30 days. Here is the terminal command to find and delete files recursively Linux.

You can easily find and remove multiple files with the extension or delete files older than 7 days in Linux.

Find and Delete Files Older Than X Minutes

Run the following commands to find to delete files which are older than 15 minutes:

find . -name "example*.txt" -type f -mmin +15 -delete

In this above command, the file name is prefixed with the -name option and -type f means we want to find for files only. The -mmin stands for the modification time in minutes and +15 means we want to find files that were last modified 15 minutes ago or earlier than the specified time.

Find and Delete Files Older Than 30 Days

Run the following commands to find to delete files which are older than 30 days:

find . -name "example*.txt" -type f -mtime +5 -delete

Note that the -mtime option specifies to run the find command and to delete files that were modified at least 5 days ago.

Find and Delete Files Recursively Linux

To find and delete files recursively in Linux, we will use the rm command. It is so because the -delete option may fail if the directory is not empty.

Simply run the find command to search for the specific file and then use rm command to delete:

find /Downloads/Images -type d -mtime +90 find /Downloads/Images -type d -mtime +30 -exec rm -rf {} \;

Find and Delete Files With .mp4 Extension

To find and delete files with a specific extension, simply specify the extension with the file name to be searched.

Primary Sidebar

Latest Posts

Downlaod Ubuntu 26.10 Stonking Stingray

How To Shutdown Linux With A 15 Minute Delay And Message

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

Check How Many Users Are Created In Linux Ubuntu

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap