{"id":8583,"date":"2024-11-06T19:27:11","date_gmt":"2024-11-06T19:27:11","guid":{"rendered":"https:\/\/www.insanelymac.com\/blog\/?p=8583"},"modified":"2024-11-06T19:27:11","modified_gmt":"2024-11-06T19:27:11","slug":"how-to-recover-files-deleted-by-rm-command-on-mac","status":"publish","type":"post","link":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/","title":{"rendered":"How to Recover Files Deleted by RM Command on Mac"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_69_1 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#is_it_possible_to_undo_rm_command_on_macos\" title=\"Is It Possible to Undo RM Command on macOS?\">Is It Possible to Undo RM Command on macOS?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#no_backups_use_a_data_recovery_app_to_recover_files_deleted_with_rm_on_a_mac\" title=\"No Backups? Use a Data Recovery App to Recover Files Deleted with RM on a Mac\">No Backups? Use a Data Recovery App to Recover Files Deleted with RM on a Mac<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#how_to_recover_files_deleted_with_rm_on_macos_with_backups\" title=\"How to Recover Files Deleted with RM on macOS with Backups\">How to Recover Files Deleted with RM on macOS with Backups<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#1_time_machine_backup\" title=\"1. Time Machine Backup\">1. Time Machine Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#2_icloud_backup\" title=\"2. iCloud Backup\">2. iCloud Backup<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#is_there_only_diy_options\" title=\"Is There Only DIY Options?\">Is There Only DIY Options?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#faq\" title=\"FAQ\">FAQ<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#how_to_revert_rm_command_using_macs_terminal\" title=\"How to revert rm command using Mac\u2019s Terminal?\">How to revert rm command using Mac\u2019s Terminal?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#where_do_files_deleted_with_the_rm_command_go\" title=\"Where do files deleted with the rm command go?\">Where do files deleted with the rm command go?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#how_to_undo_rm_-rf_on_mac\" title=\"How to undo rm -rf on Mac?\">How to undo rm -rf on Mac?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p>The RM command works great and helps remove files quickly and easily. But what if you accidentally delete something important? One wrong move and those files vanish, skipping the Trash completely. We\u2019ve been there and know how easy it is to make that mistake. We\u2019ve also helped plenty of others recover from it. Let&#8217;s talk about how to undo the RM command on Mac, what options you have, and what might be out of reach.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"is_it_possible_to_undo_rm_command_on_macos\"><\/span>Is It Possible to Undo RM Command on macOS?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The short answer is yes, but it comes with some conditions. <strong>Let\u2019s first look at what exactly the RM command was used:<\/strong><\/p>\n<p><img fetchpriority=\"high\" class=\"border-gray aligncenter wp-image-8587 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/11\/rm-command.jpg\" alt=\"rm command description\" width=\"1838\" height=\"1324\" \/><\/p>\n<div class=\"table_wrapper\"><p>\n<table>\n<tbody>\n<tr>\n<td><strong>RM Command<\/strong><\/td>\n<td><strong>Description<\/strong><\/td>\n<td><strong>Is recovery possible?<\/strong><\/td>\n<\/tr>\n<tr>\n<td>rm<\/td>\n<td>Deletes specified files without prompts (unless permissions prevent writing and input is a terminal)<\/td>\n<td><strong>Yes<\/strong>\u2014Files are unlinked but data remains until overwritten.<\/td>\n<\/tr>\n<tr>\n<td>rm -d<\/td>\n<td>Removes directories as well as other types of files<\/td>\n<td><strong>Yes<\/strong>\u2014Data can be recovered if not overwritten.<\/td>\n<\/tr>\n<tr>\n<td>rm -f<\/td>\n<td>Forces deletion without prompts, regardless of permissions<\/td>\n<td><strong>Yes<\/strong>\u2014Similar to rm, data remains until overwritten.<\/td>\n<\/tr>\n<tr>\n<td>rm -i<\/td>\n<td>Prompt for confirmation before you delete each file.<\/td>\n<td><strong>Yes<\/strong>\u2014Same as rm, but with a confirmation step.<\/td>\n<\/tr>\n<tr>\n<td>rm -I<\/td>\n<td>Prompts once if you delete more than three files<\/td>\n<td><strong>Yes<\/strong>\u2014Same as rm, with less intrusive confirmation.<\/td>\n<\/tr>\n<tr>\n<td>rm -P<\/td>\n<td>Has no effect; kept for backward compatibility<\/td>\n<td><strong>N\/A<\/strong>\u2014Does not affect data recovery.<\/td>\n<\/tr>\n<tr>\n<td>rm -R or rm -r<\/td>\n<td>Recursively deletes files and directories; implies -d<\/td>\n<td><strong>Yes<\/strong>\u2014Data can be recovered if not overwritten.<\/td>\n<\/tr>\n<tr>\n<td>rm -v<\/td>\n<td>Display each file as it is deleted.<\/td>\n<td><strong>Yes<\/strong>\u2014Same as rm, with additional output.<\/td>\n<\/tr>\n<tr>\n<td>rm -x<\/td>\n<td>When deleting recursively, does not cross mount points<\/td>\n<td><strong>Yes<\/strong>\u2014Same as rm, limited to the current filesystem.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>As you can see, when you delete files using the rm command, they are unlinked from the filesystem, but the actual data remains on the disk until it&#8217;s overwritten by new data. This means recovery is possible with specialized software. But that\u2019s not the whole story. <strong>There\u2019s more to consider if you don\u2019t have any backups:<\/strong><\/p>\n<ul>\n<li><strong>What kind of drive was it deleted from?<\/strong> Was it a hard drive? or SSD? This detail matters because of <a href=\"https:\/\/www.techtarget.com\/searchstorage\/definition\/TRIM\" target=\"_blank\" rel=\"noopener\">TRIM<\/a>. TRIM is a feature SSDs use that tells the drive to clear data blocks right after deletion. This makes recovery tough because the space gets wiped almost immediately. With HDDs, the data usually stays until new data overwrites it, which gives you more time to recover.<\/li>\n<li><strong>If it&#8217;s SSD was it an internal or external SSD?<\/strong> If you <a href=\"https:\/\/www.insanelymac.com\/blog\/mac-ssd-data-recovery\/\">deleted files from an SSD<\/a> connected through a hub to your Mac or MacBook, your chances are higher. If it uses a USB Type-A or Type-C connection, macOS doesn\u2019t send the TRIM command to the SSD at all. Even in some cases with Thunderbolt connections through cheaper hubs, TRIM doesn\u2019t run.<\/li>\n<li><strong>What happened after the deletion?<\/strong> Did you write new data to the drive? Saved any new files? Any new data can overwrite deleted data and make recovery impossible.<\/li>\n<\/ul>\n<div class=\"frame_bg frame_bg--danger\"><div class=\"frame_bg--title\"><\/div>\u2757 <strong>Important<\/strong>. We always recommend, in cases of accidental deletion, to avoid doing anything with the drive from which files were deleted. This means no new files, no downloads, <strong>no activity<\/strong> until you\u2019re ready to start the recovery process.<\/div>\n<h2><span class=\"ez-toc-section\" id=\"no_backups_use_a_data_recovery_app_to_recover_files_deleted_with_rm_on_a_mac\"><\/span>No Backups? Use a Data Recovery App to Recover Files Deleted with RM on a Mac<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Sadly, in our experience, people don\u2019t think about backups until it\u2019s too late. So, we\u2019ll start with data recovery software. We will cover backup methods as well, but we\u2019ll get to that later.<\/p>\n<p>Data recovery apps search the drive&#8217;s file system for fragments or records of the deleted data, which still exist until they get overwritten. There are many options to choose from, and you can check out <a href=\"https:\/\/www.insanelymac.com\/blog\/best-mac-data-recovery-software\/\">our list of the best data recovery apps available for macOS<\/a> to find one.<\/p>\n<p>Our go-to tool for recovery is <a href=\"https:\/\/www.cleverfiles.com\/\" target=\"_blank\" rel=\"noopener\">Disk Drill<\/a>. We\u2019ve <a href=\"https:\/\/www.insanelymac.com\/blog\/disk-drill-review\/\">used it many times<\/a> in similar situations, and if there\u2019s still something left to recover, Disk Drill can get it done. <strong>Here\u2019s how to use Disk Drill to recover files deleted with the RM command:<\/strong><\/p>\n<ol>\n<li>Head to the official Disk Drill site and <a href=\"https:\/\/www.cleverfiles.com\/download.html\" target=\"_blank\" rel=\"noopener\">download the app<\/a>. Install it on a different drive than the one where you deleted the files to avoid overwriting data.<img class=\"border-gray aligncenter wp-image-7573 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/09\/disk-drill-install.jpg\" alt=\"Install it on a different drive if possible\" width=\"1436\" height=\"1156\" \/><\/li>\n<li>Open Disk Drill and pick the drive or partition where the RM command deleted your files. If it\u2019s an external drive, make sure it\u2019s connected.<img class=\"border-gray aligncenter wp-image-7700 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/09\/disk-drill-apfs.jpg\" alt=\"Click on Search for lost data\" width=\"2370\" height=\"1620\" \/><\/li>\n<li>Click on <strong>Search for lost data<\/strong>. Disk Drill will automatically run through <strong>Quick Scan<\/strong> (finds recently deleted files using the existing file structure), <strong>Deep Scan<\/strong> (looks for file fragments and raw data when the file structure is damaged or missing), and <strong>Signature Scan<\/strong> (searches for known file types based on their <a href=\"https:\/\/www.handyrecovery.com\/understanding-file-signatures-and-signature-based-data-recovery\/\" target=\"_blank\" rel=\"noopener\">unique binary signatures<\/a>).<img loading=\"lazy\" class=\"border-gray aligncenter wp-image-7701 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/09\/disk-drill-scanning-data.jpg\" alt=\"Disk Drill scanning the drive\" width=\"2370\" height=\"1620\" \/><\/li>\n<li>As Disk Drill runs the scan, you can click <strong>Review found items<\/strong> at the top to check out files it\u2019s already identified. You can also click on any of the categories shown in the screenshot\u2014like <strong>Pictures<\/strong>, <strong>Videos<\/strong>, <strong>Audio<\/strong>, <strong>Documents<\/strong>, <strong>Archives<\/strong>, or <strong>Other<\/strong>\u2014to jump straight to those file types. This way, you can start looking for what you need even before the full scan finishes.<img loading=\"lazy\" class=\"border-gray aligncenter wp-image-7702 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/09\/disk-drill-preview-pic.jpg\" alt=\"Preview the recoverable files\" width=\"2370\" height=\"1620\" \/><\/li>\n<li>Take a look at the list of found files. You\u2019ll see them sorted into subcategories like <strong>Existing files<\/strong>, <strong>Deleted or lost<\/strong>, and <strong>Reconstructed<\/strong>. If there are a lot of files, you can use the search bar at the top to find specific files by name or extension, like .pdf or .jpg.<\/li>\n<li>When you click on a file, you\u2019ll see a preview on the right side. Disk Drill also shows recovery chances for each file, so you\u2019ll know how likely it is to get the file back in good shape.<\/li>\n<li>Finally, once you\u2019ve selected all the files you want, click on the <strong>Recover<\/strong> button. Keep in mind that the Basic version of Disk Drill lets you scan and preview files, but to actually recover them, you\u2019ll need to upgrade to the <a href=\"https:\/\/www.cleverfiles.com\/pro.html\" target=\"_blank\" rel=\"noopener\">PRO version<\/a>.<\/li>\n<\/ol>\n<p>Disk Drill is a powerful tool, and we\u2019ve recovered data from all kinds of situations with it\u2014<a href=\"https:\/\/www.insanelymac.com\/blog\/recover-formatted-hard-drive-mac\/\">formatted drives<\/a>, <a href=\"https:\/\/www.insanelymac.com\/blog\/how-to-fix-corrupted-sd-card-on-mac\/\">corrupted SD cards<\/a>, even <a href=\"https:\/\/www.insanelymac.com\/blog\/recover-deleted-photos-iphone\/\">iPhones<\/a>. If any tool can get your files back, it\u2019s Disk Drill. But as we said before, not every situation has a happy ending. If the data\u2019s been overwritten, no app, no matter how high-end, can pull off a miracle. So, it\u2019s important to manage your expectations. Acting quickly boosts your chances, but some cases just aren\u2019t recoverable.<\/p>\n<div class=\"frame_bg frame_bg--primary\"><div class=\"frame_bg--title\"><\/div>\u2b50 <strong>Tip.<\/strong> To avoid problems in the future, use <a href=\"https:\/\/www.cleverfiles.com\/help\/how-to-use-recovery-vault-and-guaranteed-recovery\/\" target=\"_blank\" rel=\"noopener\">Disk Drill\u2019s data protection features<\/a>. It comes with tools like <strong>Recovery Vault<\/strong> and <strong>Guaranteed Recovery<\/strong>, which act as safety nets for your files. Recovery Vault logs file metadata so if something gets deleted, you have a better shot at getting it back with all its details intact. Guaranteed Recovery automatically saves copies of deleted files so they\u2019re easy to restore later.<\/div>\n<h2><span class=\"ez-toc-section\" id=\"how_to_recover_files_deleted_with_rm_on_macos_with_backups\"><\/span>How to Recover Files Deleted with RM on macOS with Backups<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now, as we promised, let\u2019s cover backup options. macOS comes with <a href=\"https:\/\/support.apple.com\/en-us\/104984\" target=\"_blank\" rel=\"noopener\">Time Machine<\/a> and <a href=\"https:\/\/support.apple.com\/en-gb\/guide\/icloud\/welcome\/icloud\" target=\"_blank\" rel=\"noopener\">iCloud<\/a> as built-in features. If you set them up beforehand, great\u2014you can easily, so to speak, revert the RM command. Here\u2019s a reminder on how to use these features.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"1_time_machine_backup\"><\/span>1. Time Machine Backup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If <a href=\"https:\/\/www.insanelymac.com\/blog\/restore-from-time-machine\/\">Time Machine was active<\/a> before the deletion, you can recover your files easily. Just connect your backup drive, click the Time Machine icon in the menu bar, and choose <strong>Browse Time Machine Backups<\/strong>. Use the timeline on the right to go to the date when your files were still there, find the deleted files, and click <strong>Restore<\/strong>. Time Machine will put them back in their original spot, essentially undoing the RM command.<\/p>\n<p><img loading=\"lazy\" class=\"border-gray aligncenter wp-image-7770 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/09\/time-machine-bookmark-scaled.jpg\" alt=\"Use the timeline to browse through backups\" width=\"2560\" height=\"1600\" \/><\/p>\n<div class=\"frame_bg frame_bg--success\"><div class=\"frame_bg--title\"><\/div>\u2b50 <strong>Tip<\/strong>. Time Machine also keeps local backups, which it updates every <strong>24 hours<\/strong>. So, even if you don\u2019t have your backup drive handy, you can still recover <strong>recent versions<\/strong> of deleted files directly from your Mac. <\/div>\n<h3><span class=\"ez-toc-section\" id=\"2_icloud_backup\"><\/span>2. iCloud Backup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Another built-in option is <a href=\"https:\/\/www.icloud.com\/\" target=\"_blank\" rel=\"noopener\">iCloud<\/a>. Just like Time Machine, iCloud needs to have been set up in advance to help with file recovery. iCloud backs up data across your devices, and lets you restore certain files if they were saved to iCloud Drive or other synced locations. Here are the main locations iCloud typically backs up:<\/p>\n<ul>\n<li><strong>iCloud Drive<\/strong>. Files saved here sync automatically across all Apple devices linked to your account, like documents, folders, and any files you\u2019ve added to iCloud Drive.<\/li>\n<li><strong>Desktop and Documents folders<\/strong>. If enabled, macOS can back up files from your Desktop and Documents folders to iCloud Drive, which makes them accessible on other devices.<\/li>\n<li><strong>Photos and videos<\/strong>. If you use iCloud Photos, all photos and videos sync across devices linked to your iCloud account, so they\u2019re available even if deleted from one device.<\/li>\n<li><strong>App Data for iCloud-enabled apps<\/strong>. Some apps store data in iCloud, so settings, files, and app-specific data are accessible on any device where you log in.<\/li>\n<\/ul>\n<p>If the files you need fall into one of these categories, you may be able to restore them directly from iCloud. <strong>How to restore files with iCloud:<\/strong><\/p>\n<ol>\n<li>Open a browser, go to<a href=\"https:\/\/www.icloud.com\" target=\"_blank\" rel=\"noopener\"> iCloud.com<\/a>, and sign in with your Apple ID.<\/li>\n<li>Click on <strong>Drive<\/strong> to view your files.<img loading=\"lazy\" class=\"border-gray aligncenter wp-image-8216 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/10\/icloud.jpg\" alt=\"iCloud web interface\" width=\"2162\" height=\"1448\" \/><\/li>\n<li>Look in the <strong>Recently Deleted<\/strong> folder on the left sidebar. iCloud keeps deleted files here for up to 30 days, so it\u2019s a good place to find files that were removed.<img loading=\"lazy\" class=\"border-gray aligncenter wp-image-8217 size-full\" src=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2024\/10\/icloud-recover.jpg\" alt=\"Click Recover\" width=\"2284\" height=\"1616\" \/><\/li>\n<li>Browse through the list, choose the files you want, and click <strong>Recover<\/strong>. iCloud will put the files back in their original spot in iCloud Drive.<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"is_there_only_diy_options\"><\/span>Is There Only DIY Options?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The DIY methods we covered here usually provide great results. We\u2019ve seen plenty of people successfully undo the RM command on a Mac with these tools. But if you\u2019re not comfortable doing it yourself, or if the deleted data is too important to risk, you can always go with a <a href=\"https:\/\/www.handyrecovery.com\/best-data-recovery-services\/\" target=\"_blank\" rel=\"noopener\">professional data recovery service<\/a>.<\/p>\n<p>These services aren\u2019t cheap, but they have access to advanced equipment and tools that home users just don\u2019t have. They\u2019re equipped to handle tough cases, even if the drive is physically damaged. Just keep in mind, though, that even the pros can\u2019t recover data that\u2019s already been overwritten. Once new data fills that space, recovery is out of reach\u2014even with the best gear.<\/p>\n<div class=\"frame_bg frame_bg--primary\"><div class=\"frame_bg--title\"><\/div>\ud83d\udee1\ufe0f Many reputable data recovery services offer a &#8220;no data, no charge&#8221; policy. If they can&#8217;t recover your data, you won&#8217;t pay a dime.<\/div>\n<section itemscope=\"\" itemtype=\"https:\/\/schema.org\/FAQPage\"><div class=\"panel-group sc_accordion_faq\" id=\"accordion\" role=\"tablist\" aria-multiselectable=\"true\"><h2 class=\"sc_accordion_faq--title\"><span class=\"ez-toc-section\" id=\"faq\"><\/span>FAQ<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"panel panel-default\" itemprop=\"mainEntity\" itemscope=\"\" itemtype=\"http:\/\/schema.org\/Question\">\r\n    <div class=\"panel-heading\" role=\"tab\" id=\"heading1\" aria-selected=\"true\">\r\n        <h3 class=\"panel-title\" itemprop=\"name\"><span class=\"ez-toc-section\" id=\"how_to_revert_rm_command_using_macs_terminal\"><\/span>\r\n            <a role=\"button\" data-toggle=\"collapse\" href=\"#collapse1\" aria-expanded=\"true\" aria-controls=\"collapse1\">\r\n                How to revert rm command using Mac\u2019s Terminal?\r\n                <i class=\"fas fa-plus\"><\/i>\r\n            <\/a>\r\n        <span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n    <\/div>\r\n    <div id=\"collapse1\" class=\"panel-collapse collapse in\" role=\"tabpanel\" aria-labelledby=\"heading1\">\r\n        <div class=\"panel-body\" itemprop=\"acceptedAnswer\" itemscope=\"\" itemtype=\"http:\/\/schema.org\/Answer\">\r\n            <div itemprop=\"text\">\r\n                Unfortunately, once you use the rm command in Terminal, there\u2019s no built-in way to \u201crevert\u201d or undo the deletion. The rm command permanently deletes files without sending them to the Trash, so the files are immediately marked for overwriting, and macOS doesn\u2019t have a Terminal command to recover them.\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\n<div class=\"panel panel-default\" itemprop=\"mainEntity\" itemscope=\"\" itemtype=\"http:\/\/schema.org\/Question\">\r\n    <div class=\"panel-heading\" role=\"tab\" id=\"heading2\" aria-selected=\"true\">\r\n        <h3 class=\"panel-title\" itemprop=\"name\"><span class=\"ez-toc-section\" id=\"where_do_files_deleted_with_the_rm_command_go\"><\/span>\r\n            <a role=\"button\" data-toggle=\"collapse\" href=\"#collapse2\" aria-expanded=\"true\" aria-controls=\"collapse2\">\r\n                Where do files deleted with the rm command go?\r\n                <i class=\"fas fa-plus\"><\/i>\r\n            <\/a>\r\n        <span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n    <\/div>\r\n    <div id=\"collapse2\" class=\"panel-collapse collapse in\" role=\"tabpanel\" aria-labelledby=\"heading2\">\r\n        <div class=\"panel-body\" itemprop=\"acceptedAnswer\" itemscope=\"\" itemtype=\"http:\/\/schema.org\/Answer\">\r\n            <div itemprop=\"text\">\r\n                Unlike files deleted through Finder, which end up in the Trash, files deleted with the rm command don\u2019t \u201cgo\u201d anywhere\u2014they\u2019re permanently erased from the file system right away. The rm command skips the Trash completely, but the actual data itself remains on the drive until it\u2019s overwritten by new data.\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\n<div class=\"panel panel-default\" itemprop=\"mainEntity\" itemscope=\"\" itemtype=\"http:\/\/schema.org\/Question\">\r\n    <div class=\"panel-heading\" role=\"tab\" id=\"heading3\" aria-selected=\"true\">\r\n        <h3 class=\"panel-title\" itemprop=\"name\"><span class=\"ez-toc-section\" id=\"how_to_undo_rm_-rf_on_mac\"><\/span>\r\n            <a role=\"button\" data-toggle=\"collapse\" href=\"#collapse3\" aria-expanded=\"true\" aria-controls=\"collapse3\">\r\n                How to undo rm -rf on Mac?\r\n                <i class=\"fas fa-plus\"><\/i>\r\n            <\/a>\r\n        <span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n    <\/div>\r\n    <div id=\"collapse3\" class=\"panel-collapse collapse in\" role=\"tabpanel\" aria-labelledby=\"heading3\">\r\n        <div class=\"panel-body\" itemprop=\"acceptedAnswer\" itemscope=\"\" itemtype=\"http:\/\/schema.org\/Answer\">\r\n            <div itemprop=\"text\">\r\n                The rm -rf command is one of the most powerful delete commands on macOS. It permanently deletes files and folders (files skip the Trash). Once you run rm -rf, the files are marked for overwriting, which makes recovery tough. Here\u2019s what you can try:<\/p>\n<ul>\n<li>First up, check for <strong>backups<\/strong>. If you\u2019ve set up Time Machine or iCloud, you might be in luck. These tools create regular snapshots of your data, so you can go back to a time before the files were deleted. Think of it as hitting the rewind button on your Mac. If backups are active, this is usually your easiest and quickest way to recover files.<\/li>\n<li>Next on the list, try <strong>data recovery software<\/strong>. If backups aren\u2019t available, data recovery software like Disk Drill might save the day. This software scans your drive for any traces of deleted files. Just a heads-up: if the data hasn\u2019t been overwritten, tools like Disk Drill can help you get it back. But the longer you wait, the more likely it is that new data has taken over that space.<\/li>\n<li>And finally, <strong>professional data recovery services<\/strong>. If the files are irreplaceable and you\u2019re not getting anywhere with DIY options, a professional data recovery service could be the answer. They use specialized tools to tackle tough cases.<\/li>\n<\/ul>\n\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\n<\/div><\/section>\n","protected":false},"excerpt":{"rendered":"<p>The RM command works great and helps remove files quickly and easily. But what if you accidentally delete something important? One wrong move and those files vanish, skipping the Trash completely. We\u2019ve been there and know how easy it is to make that mistake. We\u2019ve also helped plenty of others recover from it. Let&#8217;s talk [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":560,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"_lmt_disableupdate":"no","_lmt_disable":"","footnotes":""},"categories":[90],"tags":[],"slider-tags":[],"class_list":["post-8583","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Recover Files Deleted by RM Command on Mac<\/title>\n<meta name=\"description\" content=\"Want to undo rm command on Mac? Discover ways to recover deleted files using backups, recovery apps, and when to consider professional help.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Recover Files Deleted by RM Command on Mac\" \/>\n<meta property=\"og:description\" content=\"Want to undo rm command on Mac? Discover ways to recover deleted files using backups, recovery apps, and when to consider professional help.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/\" \/>\n<meta property=\"og:site_name\" content=\"InsanelyMac Blog - Mac and iOS Reviews\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/best-data-recovery-software-bg.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"301\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Cochin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Cochin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Recover Files Deleted by RM Command on Mac","description":"Want to undo rm command on Mac? Discover ways to recover deleted files using backups, recovery apps, and when to consider professional help.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/","og_locale":"en_US","og_type":"article","og_title":"How to Recover Files Deleted by RM Command on Mac","og_description":"Want to undo rm command on Mac? Discover ways to recover deleted files using backups, recovery apps, and when to consider professional help.","og_url":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/","og_site_name":"InsanelyMac Blog - Mac and iOS Reviews","og_image":[{"width":1920,"height":301,"url":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/best-data-recovery-software-bg.jpg","type":"image\/jpeg"}],"author":"Jeff Cochin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jeff Cochin","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#article","isPartOf":{"@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/"},"author":{"name":"Jeff Cochin","@id":"https:\/\/www.insanelymac.com\/blog\/#\/schema\/person\/4ca887313fc4989d03da95cb7e4119dc"},"headline":"How to Recover Files Deleted by RM Command on Mac","datePublished":"2024-11-06T19:27:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/"},"wordCount":2194,"publisher":{"@id":"https:\/\/www.insanelymac.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#primaryimage"},"thumbnailUrl":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/best-data-recovery-software-bg.jpg","articleSection":["Guides"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/","url":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/","name":"How to Recover Files Deleted by RM Command on Mac","isPartOf":{"@id":"https:\/\/www.insanelymac.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#primaryimage"},"image":{"@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#primaryimage"},"thumbnailUrl":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/best-data-recovery-software-bg.jpg","datePublished":"2024-11-06T19:27:11+00:00","description":"Want to undo rm command on Mac? Discover ways to recover deleted files using backups, recovery apps, and when to consider professional help.","breadcrumb":{"@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#primaryimage","url":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/best-data-recovery-software-bg.jpg","contentUrl":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/best-data-recovery-software-bg.jpg","width":1920,"height":301,"caption":"Best Data Recovery Software for Mac"},{"@type":"BreadcrumbList","@id":"https:\/\/www.insanelymac.com\/blog\/how-to-recover-files-deleted-by-rm-command-on-mac\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.insanelymac.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Recover Files Deleted by RM Command on Mac"}]},{"@type":"WebSite","@id":"https:\/\/www.insanelymac.com\/blog\/#website","url":"https:\/\/www.insanelymac.com\/blog\/","name":"InsanelyMac Blog - Mac and iOS Reviews","description":"Apple, Mac and iOS reviews, news and forums","publisher":{"@id":"https:\/\/www.insanelymac.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.insanelymac.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.insanelymac.com\/blog\/#organization","name":"Insanelymac","url":"https:\/\/www.insanelymac.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.insanelymac.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/insanelymac-logo.png","contentUrl":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2020\/12\/insanelymac-logo.png","width":524,"height":168,"caption":"Insanelymac"},"image":{"@id":"https:\/\/www.insanelymac.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.insanelymac.com\/blog\/#\/schema\/person\/4ca887313fc4989d03da95cb7e4119dc","name":"Jeff Cochin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.insanelymac.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2023\/06\/Jeff-Cochin-author-at-Cleverfiles-150x150.jpg","contentUrl":"https:\/\/www.insanelymac.com\/blog\/wp-content\/uploads\/2023\/06\/Jeff-Cochin-author-at-Cleverfiles-150x150.jpg","caption":"Jeff Cochin"},"description":"Jeff Cochin is a distinguished expert in data management, recovery, and warehousing, with over a decade of hands-on experience. His expertise covers data clouds, failovers, SaaS, and the development of digital marketing strategies for high-growth startups. He possesses extensive knowledge of Mac computers, Apple's ecosystem, and iPhone technology, establishing him as a trusted authority in these fields. For nearly five years, Jeff has worked as a dedicated technical writer, conducting in-depth research and reviewing new applications and services, particularly those related to Apple and Mac technology. When away from writing, troubleshooting, or scripting for Mac and iPhone environments, he enjoys outdoor adventures. A passionate biker, kayaker, and hiker, he frequently explores new trails with friends who share his love for the outdoors.","sameAs":["https:\/\/jeffcochin.contently.com\/"],"url":"https:\/\/www.insanelymac.com\/blog\/author\/jeff-cochin\/"}]}},"modified_by":"Andrew Ysk","_links":{"self":[{"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/posts\/8583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/comments?post=8583"}],"version-history":[{"count":3,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/posts\/8583\/revisions"}],"predecessor-version":[{"id":8605,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/posts\/8583\/revisions\/8605"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/media\/560"}],"wp:attachment":[{"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/media?parent=8583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/categories?post=8583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/tags?post=8583"},{"taxonomy":"slider-tags","embeddable":true,"href":"https:\/\/www.insanelymac.com\/blog\/wp-json\/wp\/v2\/slider-tags?post=8583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}