Where downloads land on a Mac

The file was downloaded twenty minutes ago. The Downloads folder is open, sorted the way it always is, and the file is not near the top. Scrolling finds it eventually, sitting between an installer from June and a PDF whose name is a string of digits. Meanwhile the same folder holds four copies of the same attachment, three disk images that were mounted once, and a zip that was already expanded next to it. Anyone searching for downloads folder mac at this point knows perfectly well where the folder is. The useful questions are different: why does a downloaded file sometimes not land there at all, why is the sort order lying, and what has to change so the folder stops absorbing everything.

The folder, and the apps that ignore it

The Downloads folder lives at ~/Downloads, which expands to /Users/name/Downloads. It is created per user account, it appears in the Finder sidebar by default, and it sits in the Dock as a stack near the Trash. That much is fixed.

What is not fixed is which files go there. Every app that downloads something decides its own destination, and several of them default somewhere else.

Source Default destination Where it is changed
Safari ~/Downloads Safari, Settings, General, File download location
Chrome ~/Downloads Settings, Downloads, with an option to ask each time
Firefox ~/Downloads Settings, General, Downloads
Mail attachments ~/Downloads Mail, Settings, General, Downloads folder
AirDrop ~/Downloads Not configurable
Messages attachments Inside the Messages library Saved out manually with Save As
App Store Directly into Applications Not configurable

The point of the table is not the paths. It is that the Downloads folder is a default, not a rule, and a file that is missing from it is often sitting in whatever folder was last used in a Save dialog. Browsers that were once set to ask where to save each file are the usual culprit, because the answer to that question defaults to the previous location rather than to Downloads.

Safari adds one behavior worth knowing about. Its download list is a record kept by the browser, not a view of the folder. Clearing the list deletes nothing. Moving a file after downloading it breaks the link, and the magnifying glass next to the entry will no longer reveal anything. Apple documents a second habit in the same guide: downloading an item that was already downloaded causes Safari to remove the older duplicate to save space, which explains files that quietly stop existing between one download and the next.

Why the sort order does not match the reality

Sorting a folder by Date Modified is the reflex, and for downloads it is close to useless. The modification date of a downloaded file is usually the date the server says the file was last changed, which can be years before it arrived on this machine. A document downloaded today from an archive can carry a 2019 timestamp and land in the middle of the list.

The attribute that answers the actual question is Date Added, which macOS records when the file appears in a folder. In Finder, open the folder, choose View then Show View Options, and enable Date Added, then sort by that column. In list view it can also be added by Control-clicking the column headers.

From a shell, the same value is available through the metadata index:

mdls -name kMDItemDateAdded ~/Downloads/somefile.pdf

There is a related attribute that solves a different problem. kMDItemWhereFroms stores the URL a file was downloaded from, which turns an unidentifiable file name back into something meaningful:

mdls -name kMDItemWhereFroms ~/Downloads/report-final-2.pdf

For a file whose name says nothing, this is often faster than opening it. It also makes it possible to find every file that came from a particular site, which is the search most people actually want when they say they are looking for the thing from last Tuesday.

The index can also be queried by origin, which turns the folder into something closer to a searchable inbox. Restricting the search to one folder and matching on the source URL finds everything that came from a given site, regardless of what the files ended up being called:

mdfind -onlyin ~/Downloads 'kMDItemWhereFroms == "*github*"c'

The trailing c makes the comparison case insensitive. This is the search that replaces trying to remember a file name, and it works because the browser recorded the origin at download time whether or not anyone was paying attention.

Duplicates, expanded archives, and mounted images

A large part of what accumulates in Downloads is not files that were downloaded. It is the residue of files that were.

Duplicate names get numbered, not replaced. Download the same invoice twice and the second copy arrives with a suffix, which is how a folder ends up holding statement.pdf, statement-1.pdf, and statement 2.pdf, all with different byte counts and none obviously current. Sorting by Date Added at least establishes which one arrived last, which is usually but not always the one that matters.

Archives leave two copies of everything. Safari expands archives such as zip files after downloading them, controlled by the Open safe files after downloading setting in its General preferences. The result is a folder plus the original archive, both with the same name, taking up space twice. Turning that setting off means expanding archives by hand and knowing exactly what exists. Leaving it on means adding a step to delete the archive after checking the folder.

Disk images stay mounted after the app is installed. A .dmg file that was opened once remains attached as a volume until it is ejected or the Mac restarts. Mounted images show up under /Volumes and in the Finder sidebar, and they hold the disk image file in place. Listing what is currently attached and detaching it takes one command each:

ls /Volumes
hdiutil detach /Volumes/SomeApp

Clearing these three categories usually shrinks a Downloads folder more than deleting actual documents does, and none of them involve any decision about whether a file is still needed.

The quarantine flag and what it means for the folder

Files that arrive from the network get an extended attribute called com.apple.quarantine. It is what causes the dialog warning that a file was downloaded from the internet, and for applications it is what triggers Gatekeeper's checks on first launch. Apple's note on safely opening apps covers the user-facing side of this.

Two practical consequences follow. First, the attribute travels with the file. Moving a downloaded application out of Downloads and into Applications does not clear it, and the warning still appears on first launch. Second, the attribute is visible and removable from a shell:

xattr -p com.apple.quarantine ~/Downloads/tool.dmg
xattr -d com.apple.quarantine ~/Downloads/tool.dmg

Removing it should be a deliberate act on a file whose origin is known, not a habit. The flag exists to make the origin of a file visible at the moment it is opened, and stripping it by reflex removes the one signal that separates a file that was fetched on purpose from one that arrived some other way.

There is a third consequence that catches people building things. Scripts, binaries, and libraries pulled from a browser into a project folder carry the attribute with them, and some tools refuse to load a quarantined file or fail with an error that says nothing about quarantine. The same applies to fonts, plugins, and anything loaded by another application rather than launched directly. When a file that looks correct is rejected for no visible reason, checking xattr -l on it is a fast way to rule the flag in or out before spending time on the tool itself.

Keeping the folder from becoming an archive

macOS does not clean the Downloads folder. Storage recommendations under System Settings, General, Storage will offer to empty the Trash automatically after 30 days, and will point out large files, but nothing removes downloads on a schedule. Left alone, the folder grows until it is the largest folder in the home directory and the slowest to open.

Three approaches work, and they differ mainly in how much setup they need.

Sort and sweep by hand

Sort by Date Added, select everything below a cutoff, and decide in one pass. This takes minutes and needs nothing installed. It also stops happening after the second or third time, which is why the other two exist. Putting it on a fixed day rather than doing it when the folder feels full is what makes the difference, because the folder always feels full and the feeling stops registering.

Split the destination by source

Point the browser at a folder that is not Downloads, and leave Downloads for everything else. A folder called Inbox inside the home directory, used only by the browser, makes the distinction between "something was fetched deliberately" and "something arrived" visible in the file system rather than in memory.

Automate the sweep

A Folder Action or a scheduled script can move anything older than a set number of days into an archive folder. Written in a shell it is a short command, but the useful version filters on Date Added rather than modification time, which means querying the metadata index rather than using find -mtime. That distinction is the reason most one-line cleanup scripts found online move the wrong files.

Whichever one is chosen, the sweep should move files rather than delete them, at least at first. An archive folder that gets emptied on a longer cycle costs disk space and nothing else, and it turns a decision that has to be right into one that can be reversed. The failure mode of automated cleanup is not that it misses something. It is that it takes something that was still needed, once, and the person then turns the automation off and goes back to a folder with four thousand files in it.

The part that is not about the folder

Every approach above ends in the same shape. Look at the folder in Finder. Decide something. Switch to a terminal to run the command that expresses the decision. Switch back to Finder to see whether it worked. For a folder that gets new files several times an hour, that loop runs constantly, and the file being worked on has to be located again in each window.

A file manager with a built-in terminal removes that specific cost, because the listing and the command line share a current directory. Checking where a file came from, moving a batch by age, and confirming the result all happen without changing windows. Features covers what is included in that arrangement, and Compared with other file managers sets it against Finder with a separate terminal and against the other options. Cost is on Pricing.

What to change first

Turn on Date Added in the Downloads folder and sort by it, because most of the confusion about downloads is a sorting problem wearing a different hat. If the folder is then readable but every cleanup still means switching between a window that shows files and a window that runs commands, that is the part Atriens is built to remove.

Frequently asked questions

Why do some downloads not appear in the Downloads folder?

The app that downloaded the file decided where to put it. Browsers set to ask where to save each file default to the last folder used, not to Downloads. Messages keeps attachments inside its own library, and the App Store installs directly into Applications. Check the download settings of the specific app before searching the disk.

Can the Downloads folder be moved to an external drive?

The folder itself can be relocated, but each app that writes to it has to be pointed at the new path separately, and anything writing to ~/Downloads while the drive is unmounted will fail or recreate a local folder. Changing the download location per app is more predictable than moving the folder.

Does iCloud Drive sync the Downloads folder?

No. The iCloud Drive option that syncs folders covers Desktop and Documents only. Downloads stays local to each Mac, which is why a file downloaded on one machine does not appear on another even with iCloud Drive fully enabled.

How can the original source of a downloaded file be found?

macOS stores the source URL in a metadata attribute. Running mdls -name kMDItemWhereFroms on the file prints the address it came from, which usually identifies a file faster than opening it. The same attribute is visible in Finder by selecting the file and opening the Get Info window.

Back to all posts