• 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

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

3 Commands To Check USB Connection In Linux Terminal

Linux Terminal Commands for Beginners With Examples

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

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