About 3,910,000 results
Open links in new tab
  1. How to Remove Temporary Files Safely and Automatically in Linux

    Apr 26, 2025 · Regularly cleaning up temporary files is essential for maintaining a healthy Linux system. By following this guide, you can manually remove temporary files, automate the process using cron jobs, or utilize specialized tools to keep your …

  2. How to clean /tmp? - Ask Ubuntu

    Nov 21, 2013 · sudo find /tmp -type f -atime +10 -delete. Here the command is using sudo to make sure everything is deleted (or you could run it as root), operating on files that haven't been accessed for more than 10 days and only deletes files, not folders. It also uses -delete to avoid having to execute rm command

  3. Methods to clean temporary files from Ubuntu - GeeksforGeeks

    Jun 23, 2021 · In this article we are going to learn how to clean temporary files from Ubuntu. Let’s first see what exactly a temporary file. A temporary file is a file created to hold information while a file is being created or modified. Now let’s see why we need to clean or delete the temporary files.

  4. Is It Safe to Clear the /tmp Temporary Directory? | Baeldung on Linux

    Mar 18, 2024 · We can always use standard tools for attempting to remove all temporary files: $ rm -rf /tmp/* However, to avoid potential issues, we can use standard and safer ways to clear /tmp.

  5. How to Clean Up a Linux System | Baeldung on Linux

    Mar 12, 2025 · In this tutorial, we’ll discuss how we can clean a Linux system of unused files and directories to free up disk space. First, we’ll see how to carry out the clean-up process manually. We’ll make use of tools such as du and ncdu. Additionally, we’ll go over the removal of cached files, old logs, temporary files, and unused dependencies.

  6. Shell Script to Remove Temporary Files - GeeksforGeeks

    Apr 27, 2021 · This shell script demonstrates the number of temporary files in “/tmp” directory and clearing the “/tmp” directory. Approach: We will count the number of temporary files present in the temporary directory i.e “/tmp” directory and display the count to the user before and after deleting the temporary files.

  7. How to cleanup tmp folder safely on Linux - Super User

    Nov 3, 2012 · Once atime is enabled, all you have to do is to replace the -mtime parameter in the above command line with -atime. You might be able to remove the -not -exec fuser -s {} ';', but I'd keep it there just to be sure (in case applications keep files open for a long period of time).

  8. Automatically Clean Unused Temporary files in Linux

    Aug 5, 2024 · Automatically Clean Unused Temporary files in Linux. In Red Hat Enterprise Linux 7 and later, a new tool called systemd-tmpfiles is included. This tool provides a structured and configurable method to manage temporary directories and files.

  9. How to Clear Temp Folder & Files in Ubuntu?

    Jan 16, 2024 · To clear the temporary files in Ubuntu, locate the “/tmp” folder and remove its files using the “find” and the “delete” commands. To entirely remove the “ /tmp ” directory, you can use the “ rm ” command.

  10. Linux tmp Directory: Everything You Need to Know | FOSSLinux

    Jul 20, 2020 · There are two things you need to consider when trying to manage the Linux /tmp directory. First, you need to know how to determine which files to remove from the /tmp directory, as randomly deleting the files will disrupt users’ activities.

  11. Some results have been removed
Refresh