Solved: Safari keeps downloading unknown files

Safari is by far the most popular web browser for Mac. Mostly, that’s because it’s pre-installed with macOS and made by Apple. At the same time, Safari is also fast, has some great features, and is deeply integrated with other Apple apps and services, like share sheets and Shortcuts. Most of the time, Safari works brilliantly. But now and again, it can do some strange things. One of those is when Safari keeps downloading unknown files. Has that ever happened to you? If so, keep reading. We’ll explain why and what you should do to fix it.

Why does Safari keep downloading unknown files?

There are two main reasons why Safari may keep downloading unknown files. The first is that you have navigated to a website that distributes malware. The second is that there is a bug in Safari or in the way the website is coded that causes a file to be downloaded every time Safari reloads a web page on a specific website.

Are the unknown files harmful?

They could be. If they contain malware, it’s possible that they could cause problems for your Mac. macOS has some excellent security in place to stop your Mac from being accessed without your permission and infected by malware. But much of it relies on you being vigilant and reading warnings that appear on the screen before responding to them. It’s important that you read the warnings carefully and respond appropriately. For example, if you see a request in Safari to allow downloads from a website, don’t just click it without making sure that you’re happy to accept downloads from that site.

Tip
CleanMyMac X - Safari in Privacy module

Files that download without your permission or even your knowledge are an invasion of your privacy because you don't know what they are doing on your Mac. Apple does a great job of providing features to help you maintain privacy, but they are not always easy to manage and are located in different places. The easiest way to manage your privacy is to use an application that puts all the settings, including clearing website data, emptying your Recent Items list, and customizing permissions for apps that want to use your camera or microphone, in one place. We recommend CleanMyMac X. Its Privacy module does all that and lets you remove Wi-Fi networks from the list of Wi-Fi networks you’ve previously connected to that your Mac keeps. You can download it for free here.

What to do if Safari keeps downloading unknown files

If you’re sure the files are being downloaded by Safari — that is, that you see the download progress in Safari and the files don’t just appear in your Downloads folder — the first thing to do is to close all the open tabs. It’s likely that the downloads are coming from one of those.

The next step is to clear out all the data that websites you have visited have placed on your Mac. Here’s how to do that:

  1. Click on the Safari menu and choose Settings.
  2. Choose the Privacy tab.
  3. Click Manage Website Data.
  4. Wait for the data to load, then click Remove All.


When you do that, all the temporary and cache files that sites have downloaded onto your Mac, including cookies, will be deleted. That may mean websites are slower initially, but it may fix the problem.

Disable extensions

Extensions in Safari add functionality to the browser. However, if you have installed extensions that are now out of date, they could be misbehaving and causing it to download files.

  1. Go to Safari > Settings.
  2. Choose the Extensions tab.
  3. Deselect the box next to the extensions you want to disable.
  4. If you want to uninstall an extension completely, select it and click Uninstall.

If the files stop downloading when you disable extensions, you know one of the extensions was the culprit. You can then enable them again one by one until you discover which one is at fault.

Update macOS

It’s a long shot, but the problem might be caused by a bug in Safari that is fixed in the latest version. In any case, it’s always a good idea to update macOS. Go to Apple menu > Settings > General > Software Update to check if an update is available. If there is one, follow the on-screen instructions to install it.

Tip

As we said above, one possible cause of Safari downloading unknown files is malware. Therefore, it’s a good idea to scan your Mac for malware so you can remove it if there is any. As well as having the Privacy module, CleanMyMac X also has a Malware Removal module that scans your Mac and compares what it finds with a database of known malware. You can scan manually or enable malware monitor and background scan to always stay protected.

Malware removal module of CleanMyMacX

Reinstall macOS

If nothing else works and Safari keeps downloading unknown files, the only course of action left is to reinstall Safari. However, Safari is part of macOS, so the only way to reinstall it is to reinstall macOS.

Before you do that, you should back up all your data. If you back up to Time Machine, you can restore your data and your settings from the Time Machine backup during the installation process.

Now, boot into recovery mode:

  • For an Intel-based Mac, restart while holding down Command+R. Release when you hear the startup chime.
  • For a Mac with Apple silicon, restart while holding down the power button. Release when you see the Startup Options Window. Select Options > Continue.

Once booted into recovery mode, select Reinstall macOS from macOS Utilities and follow the on-screen instructions.

Safari is a great web browser, and most of the time, it works very well. But occasionally, it misbehaves, and sometimes it may download unknown files without you choosing to download them. That could be because of a file that it has previously downloaded — which could be malware — or it could be a bug. If it happens to you, follow the steps above to fix the problem and stop it from happening again.

Laptop with CleanMyMac
CleanMyMac X

Your Mac. As good as new.