• 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

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

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

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