搜尋
首頁系統教程MAC如何在Mac上查找和刪除重複文件

如何在Mac上查找和刪除重複文件

Duplicates are essentially useless, which means they’re top candidates for a quick cleanup, including apps, photos, videos, or text files. Thanks to third-party apps, you can harness automation and tools to streamline the process or simply use built-in features on specific apps to delete duplicates manually.

I’ll be showing you how to get rid of duplicate files so you can save space for items that matter.

如何在Mac上查找和刪除重複文件

Automatically remove duplicates

With Gemini, finding and removing duplicate files on your Mac takes a matter of seconds. Available on Setapp.

Try free Security-tested

Macs don’t typically duplicate files on purpose. Rather, it’s the user’s actions that cause files to duplicate. Let’s use my habits as an example.

There have been times when I’ve:

  • Downloaded images or files multiple times by double-clicking by mistake.
  • Downloaded an email attachment multiple times.
  • Created backups of certain files or folders more than once.
  • Copied and pasted files to different locations.

Had automatic backups that generated multiple of the same file.

Even if you’re a more careful computer user than I am, duplicate files can still happen, and they’re certainly worth removing.

Find and remove duplicate files on your Mac in seconds

There are multiple ways to remove duplicate files on a Mac, and I’ve summed them all up in a general table below:

I want to delete duplicates Difficulty level How to do this
Using third-party apps Easy Use Gemini, CleanMyMac, or Disk Drill
Via Terminal Hard Use the cd ~/[folder name] command and type find ./ -type f -exec md5 {} \; | awk -F '=' '{print $2 "\t" $1}' | sort | tee duplicates.txt.
In Finder Moderate Open Finder> New Smart Folder > Search for duplicates.
In Photos Easy Go to Photos >Utilities > Duplicates.
In Mail Moderate Open Finder > Go > Go to Folder > Type ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads.
In Messages Easy Messages > Copy content > Paste it in the Search bar.
Open Finder > Go > Go to Folder > Type ~/Library/Messages/Attachments.

What is the easiest way to find duplicate files?

The fastest and simplest way to perform a duplicate file search is by using dedicated duplicate file finders, as they’re made to scour your entire disk (or at least large sections of it) and detect these duplicates.

Gemini: Get alerts on duplicates and similar files

One of them is Gemini, a duplicate Mac cleaner that locates both similar and duplicate files using a one-of-a-kind smart algorithm. While it can wipe out these files in one click, you can also go through the visual results and select and group them yourself. Through AI, Gemini can also study what sort of files you’ve chosen for removal in past scans and upgrade its algorithm accordingly.

如何在Mac上查找和刪除重複文件

Performing a scan with Gemini was easy — it took less than a minute to open the app, click the scan button, and start the scanning. While you can choose specific folders to scan through, I chose my Macintosh HD disk drive. Once that was complete, it found 308.2 MB of removable content that I could then visually review under a few categories.

如何在Mac上查找和刪除重複文件

Tip

Once you've cleaned up duplicates withGemini, it’s easy to keep your Mac organized. How? Gemini will let you know right away if it finds any new duplicates you can ditch, all from the menu bar.

如何在Mac上查找和刪除重複文件

CleanMyMac: Take control of your clutter

CleanMyMac also offers a similar straightforward cleanup method. While it’s not a dedicated duplicate cleaner, the My Clutter tool sorts through a variety of files and downloads. These include fresh duplicates over the last three months, similar images, large and old files, and downloads from browsers.

如何在Mac上查找和刪除重複文件

It took around a minute, from downloading the app to initiating a scan and getting results. I was allowed to visually review specific modules or all files. I couldn’t really tell the total of all the files together, but All Files under Large & Old Files showed 14.6 GB, most of which were files relating to The Sims 4 that I couldn’t delete. However, what I like most about CleanMyMac, aside from the neat interface, is that it provides granular categories, such as kind, size, and access date.

如何在Mac上查找和刪除重複文件

Tip

If you’re looking to do more than just clean up duplicates, you can check out other CleanMyMac tools to get rid of any junk on your Mac that you don’t need anymore. For that matter, I recommend the Smart Care tool, which will find and delete system junk, unused apps, cache files, files with malware, and so on.

Disk Drill: Remove duplicates from certain folders

Disk Drill is a file recovery app that comes with various extra tools, such as a byte-to-byte backup disk image, a secure disk wiper that prevents others from recovering deleted files, and, best of all, a duplicate file finder.

如何在Mac上查找和刪除重複文件

Like Gemini, you can choose specific files to scan through, but I chose my main Macintosh HD disk drive for the scan. The scan took no time, and the app found 234.6 MB of files to delete, spread out across pictures, documents, and others.

如何在Mac上查找和刪除重複文件

Tip

Disk Drill is a great tool for accidentally deleting something you didn’t mean to. You can get your stuff back on either your Mac or iPhone. Just open Disk Drill, click on one of the Mac storage devices tab (where you lost your files) or the iPhone/iPad tab and click Search for lost data.

How to find duplicate files using Terminal

If you’re more comfortable with backend commands and command line interfaces, Terminal is the best way to interact with the macOS, including when you want to manage files. Aren’t very familiar with Terminal? You may want to avoid this method altogether.

Here’s how to delete duplicates through Terminal:

  1. Go to Finder > Applications > Utilities > Termina. Alternatively, press Command + Space to use Spotlight search.
  2. Use the cd command to navigate to the folder you want to scan. For example, type cd ~/Downloads and press Return to scan your Downloads folder.
  3. Type find ./ -type f -exec md5 {} \; | awk -F '=' '{print $2 "\t" $1}' | sort | tee duplicates.txt and press Return.
  4. Click Allow when prompted to let Terminal access files in that folder.
  5. Wait a few seconds, and you’ll see a list of identical files.

    如何在Mac上查找和刪除重複文件

Terminal will also automatically generate a .txt file of all the duplicates.

P.S. Make sure to back up your files with Disk Drill before you start any cleanup commands. If you accidentally delete something, it’ll be tougher to get it back later.

Find duplicate files using Finder

If you’re totally against automation and have the time on your hands to do your duplicate file search manually, you can use Smart Folders in Finder.

Here’s how to do it:

  1. Open Finder.
  2. Click File in the menu bar > New Smart Folder.

    如何在Mac上查找和刪除重複文件

  3. Click the add “+” button next to Save to choose the type of files you want to display, and click the add “+” button again to select more filters.

    如何在Mac上查找和刪除重複文件

The worst part about this method is that you’ll now have to go through and sort all the files manually, which can take hours, if not days, depending on the number of files you have stored on your computer. It’s certainly not the easiest or quickest option, but if you truly want a hands-on method, it works.

Tip

Sorting by Size or Date Modified is particularly helpful for identifying duplicates.

Check for duplicates in Photos library

The number one culprit for most duplicates is photos, which is why Macs introduced an automatic duplicate detector with macOS Ventura and Sonoma that helps you remove duplicate files.

If your Mac operates either Venture or Sonoma, here’s how to check duplicates in Photos:

  1. Go to Finder > Applications > Photos (or press Command+Space).
  2. Click Utilities > Duplicates in the sidebar.
  3. Right-click on a duplicate photo and delete it, or click the merge option to merge those duplicates.

    如何在Mac上查找和刪除重複文件

This method sort of acts like a middle ground, where it’s not entirely automated nor entirely manual. The app will detect duplicates for you, but you’ll need to manually decide what you want to do with them.

How to find duplicates in Mail and Messages attachments

Not many people might realize this, but your Mail and Messages apps can truly take up a lot of space on your computer, especially if you frequently share media with your friends and family. These are often stored indefinitely in those apps until you decide to delete them. In Mail, they’re called “twin” attachments, as they’re stored in a folder on their own on your computer, too.

To find them:

  1. Open Finder.
  2. Click Go in the menu bar and choose Go to Folder (or press Shift + Command + G).
  3. Type ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads and press Return.

The folder will display all attachments downloaded from the Mail app, which may include duplicate files saved multiple times.

Note: Unfortunately, there’s now a direct way to check for duplicates on the Messages app on macOS. So there are two possible ways to find them:

  • Go to the Messages app on your Mac > Click a message and copy its content. Then, paste it in the Search bar to find duplicate messages.
  • Open Finder and click Go in the menu bar > Go to Folder (or press Shift + Command + G). Type ~/Library/Messages/Attachments and press Return. Browse through the files to identify duplicates.

It is time…to get rid of duplicate files

Now that you know how to delete duplicate files on Mac, there’s no time like the present to do so. When you take the time to use built-in tools like Finder’s Smart Folders or the Photos automatic duplicate detector, you’ll realize how much precious space was truly taken up by duplicate files. While these features are handy, third-party apps with completely automated duplicate detector solutions can scan and remove duplicates much better and effectively.

Gemini, Disk Drill, and CleanMyMac are just three tools out of the 250+ that Setapp offers under a subscription or a 7-day trial, giving you access to a wide range of apps that help you keep your Mac optimized and clutter-free. By the way, if you want to delete duplicates on your phone, then you’ll love the CleanMy®Phone app from Setapp — the next time you’re coming back from vacation, you’ll be able to clear out the clutter before you hop on the plane.

以上是如何在Mac上查找和刪除重複文件的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
如何減少Windowser Mac CPU使用如何減少Windowser Mac CPU使用Apr 16, 2025 pm 12:07 PM

MACOS Windowser:了解高CPU使用和解決方案 您是否注意到Windowser在Mac上消耗了大量CPU資源? 此過程對於Mac的圖形接口至關重要,渲染了您在屏幕上看到的所有內容。 高c

Mac的最佳剪切工具Mac的最佳剪切工具Apr 16, 2025 am 11:57 AM

屏幕截圖無處不在,但是我們很少考慮他們展示,解釋和交流的能力。 從報告軟件錯誤到共享快速的操作方法或有趣的圖像,屏幕截圖豐富了我們的日常互動。 當Windows用戶依靠S

如何在Mac上轉換視頻和音頻:終極指南如何在Mac上轉換視頻和音頻:終極指南Apr 16, 2025 am 11:39 AM

音頻文件格式繁多,令人眼花繚亂。管理起來很麻煩,當您嘗試播放音頻但喜歡的播放器因文件類型而無法播放特定文件時,就會非常令人沮喪。 這似乎令人絕望,但別擔心!您通常可以在不損失質量的情況下轉換音頻和視頻文件。在這裡,我們將引導您完成如何將視頻轉換為MP3、MP4轉換為MP3以及許多其他有用的音頻和視頻轉換。 輕鬆轉換視頻和音頻 使用專業的媒體轉換器Permute節省查找文件轉換工具的時間。 免費試用 安全可靠! 如何將視頻轉換為音頻 例如,將視頻轉換為音頻(例如MP4轉換為MP3)與其說是轉換視

如何從Mac中刪除OneDrive?如何在Apple筆記本電腦上卸載它?如何從Mac中刪除OneDrive?如何在Apple筆記本電腦上卸載它?Apr 16, 2025 am 11:02 AM

OneDrive for Mac:綜合卸載指南 Microsoft的Cloud Storage Service OneDrive提供在線文件存儲和包括Mac在內的各個平台的同步。 但是,您可能需要將其刪除以進行存儲優化,Inc

在Mac上使用Tiktok的方法在Mac上使用Tiktok的方法Apr 16, 2025 am 10:57 AM

間諜軟件清除指南:如何在幾秒鐘內擺脫Mac上的間諜軟件間諜軟件清除指南:如何在幾秒鐘內擺脫Mac上的間諜軟件Apr 16, 2025 am 10:56 AM

Mac電腦並非絕對安全:抵禦惡意軟件的實用指南 你可能聽說過Mac電腦不會感染惡意軟件,無需購買殺毒軟件。雖然有一定道理,但這說法具有誤導性。 與Windows相比,Mac電腦的安全性確實更高,這主要歸功於其操作系統架構。但這並不意味著它們堅不可摧。各種惡意軟件,從惡意腳本到病毒和間諜軟件,仍然有機會入侵你的Mac。 間諜軟件尤其值得關注,因為它可能對你的Mac和個人信息造成嚴重損害。讓我們來了解一下什麼是間諜軟件以及如何從Mac中刪除間諜軟件。 什麼是間諜軟件? 從根本上說,間諜軟件是一種惡意

將YouTube轉到GIF:將YouTube視頻轉換為GIF的4種最佳工具將YouTube轉到GIF:將YouTube視頻轉換為GIF的4種最佳工具Apr 16, 2025 am 09:54 AM

GIF動圖製作指南:輕鬆將YouTube視頻轉換為GIF GIF動圖是捕捉瞬間、表達情感或為對話增添趣味的完美方式。但如何將YouTube視頻轉換為GIF呢?這曾經感覺像是一項全新的挑戰,直到我親身體驗才發現它有多麼簡單。本指南將向您展示如何將喜愛的YouTube視頻輕鬆製作成精彩的GIF動圖。讓我們開始吧! 幾步輕鬆搞定YouTube視頻轉GIF Gifox軟件能輕鬆將屏幕錄製成GIF動圖。可在Setapp平台獲取。 免費試用 安全測試 我的需求操作步驟將YouTube視頻製作為GIF安裝並

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
4 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
4 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
1 個月前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.聊天命令以及如何使用它們
1 個月前By尊渡假赌尊渡假赌尊渡假赌

熱工具

MantisBT

MantisBT

Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

將Eclipse與SAP NetWeaver應用伺服器整合。

VSCode Windows 64位元 下載

VSCode Windows 64位元 下載

微軟推出的免費、功能強大的一款IDE編輯器

SublimeText3 英文版

SublimeText3 英文版

推薦:為Win版本,支援程式碼提示!

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

強大的PHP整合開發環境