How to prevent files from syncing

Updated Dec 04, 2025

In this article

person icon

This article applies to customers in an open beta and not generally available. Betas are subject to additional terms. Learn more here.


You can stop certain files and folders from syncing to Dropbox using ignore rules. When you create ignore rules, matching files:

  • Won’t upload to dropbox.com
  • Won’t sync to other devices
  • Won’t count toward your storage quota

This helps you save space, speed up sync, and reduce clutter.

highlighter icon

Note: Ignore rules are currently in beta for individual accounts only on Windows, macOS, and Linux. Some behaviors and patterns aren’t yet fully supported and may change.

How to create ignore rules

Ignore rules live in a plain text file called rules.dropboxignore. You can create this file in two ways:

  1. Click the Dropbox icon in your taskbar (Windows) or menu bar (Mac).
  2. Click your avatar (profile picture or initials) in the upper-right corner.
  3. Click Preferences.
  4. Go to the Sync tab.
  5. Under Set Ignore Rules, click Modify Rules.
  6. Dropbox will create a rules.dropboxignore file in your Dropbox root folder. The file includes examples to help you get started.
  1. Open a text editor like Notepad or TextEdit.
  2. Save a new file named rules.dropboxignore.
  3. Move it to the root of your Dropbox folder.
  4. Add your custom ignore rules using the syntax shown below.
magic wand icon

Tip: You can edit the file at any time. Dropbox applies changes as soon as you save.

Supported features

magic wand icon

Tip: Use # at the start of a line to add comments explaining your rules. This helps you and others understand them.

Feature Description Examples
File-based configuration Users can create a rules.dropboxignore file in the root of their Dropbox folder to define ignore rules. The file can be created automatically by following these steps.
Folder-specific ignores You can ignore an entire folder and everything inside it by ending the pattern with /. build/ ignores the “build” folder and all contents.
Absolute path matching Ignore rules can target specific absolute paths within the Dropbox folder. /Photos/vacation.jpg ignores specifically that file.
Single-character wildcard ? matches any single character, with the exception of /. ?.txt matches “a.txt”, but not “foo.txt”.
Pattern-based ignoring (globbing) Supports basic wildcard matching for filenames and extensions. *.log ignores all “.log” files in your Dropbox account.
Recursive wildcards
  • **/ matches any folder path
  • /** matches everything inside a folder
  • /**/ matches zero or more folder levels
  • **/foo matches any file or folder named “foo” under any folder.
  • abc/** ignores everything inside the “abc” folder, but not the folder itself.
  • a/**/b matches folders like “a/b”, “a/x/b”, or “a/y/z/b”.
Case sensitivity Ignore rules are not case sensitive. image.jpg ignores the file names IMAGE.jpg and image.jpg.
Forward-only behavior Ignore rules apply only to files and folders created after the rule was added. Existing files remain synced.
Per-device local control The rules.dropboxignore file itself doesn’t sync between devices. Each computer needs to have its own rule set.  
Negations Patterns beginning with ! re-include files that would otherwise be ignored.

Notes:
  • Simple negation patterns like !*.log don’t match recursively. They only match files in the root directory, unlike *.log, which will match any folder.
  • Recursive wildcards aren’t supported in negation patterns unless they appear at the end of the pattern.
    • !build/** is supported.
    • !**/test is not supported.
  • !build.apk re-includes a specific file that was ignored.
  • !foo/ re-includes a specific folder that was ignored.

Unsupported features

Feature Description
Shared folders Shared folders work like normal folders. Ignore rules don’t apply to shared folders that already exist, but do apply to any new content added to them, if the content matches an active rule
Retroactive application of rules Ignore rules affect only files and folders that are added after the rule is created. They don’t apply to content that was already in your Dropbox account before the rule existed.
Deletion of already-synced files Adding an ignore rule doesn’t delete or remove existing files that match the pattern and are already synced to dropbox.com.
Team Accounts support Ignore rules are available for Dropbox Team accounts.
Syncing of rule file across devices The rules.dropboxignore file doesn’t sync across devices.
Multiple ignore files per folder Only one ignore file per folder is evaluated.
Nested rule inheritance .gitignore-style cascading (subfolder taking over rules from parent folder).

What to expect

  • Ignored files won’t sync to dropbox.com or other devices. They stay local on your computer.
  • Files already synced won’t be removed from dropbox.com. You can delete them manually if needed.
  • Files added remotely from another device that match your rules won’t sync to your computer.
  • The rules.dropboxignore file stays local and won’t sync across your devices.
  • Ignore rules only apply to new files going forward.
  • Newly created folders that match a rule are fully ignored. If a new folder matches an existing ignore rule, then the folder and it’s content won’t sync to dropbox.com.
  • If a folder already existed before the rule was created, its content will continue to sync normally.
  • New files get ignored if they are added to an ignored folder.
     

Renaming ignored files

If you ignore all .txt files and have a .txt file that was already synced, renaming it locally on your device will change its name from file.txt to renamed.txt. This will result in renamed.txt being ignored and file.txt being deleted on dropbox.com.

If you ignore all .txt files and have a file called file.txt that was already synced, renaming it on dropbox.com will change its name from file.txt to renamed.txt.
 

Differences between rules in Dropbox and Git

There are differences between Git’s and Dropbox’s ignore rules. These differences are reflected in the current beta and may change.

The rule gitignore controls what Git tracks, while rules.dropboxignore controls what Dropbox syncs.

Ignore rules in Dropbox

  • The rules.dropboxignore file is local-only and doesn’t sync between devices. You’ll need to create it on each computer if you want the same rules everywhere.
  • Adding an ignore rule won’t delete files that are already on dropbox.com. 
    •  You can remove these files manually from your computer’s Dropbox folder or the Dropbox desktop app.
  • If you’d like the ignore rules to apply to previously added files, delete those files and add them back.
  • Dropbox doesn’t support ignore files located outside of the Dropbox root folder.
     

How to remove previously synced files

Files already synced won’t be removed from dropbox.com. You can remove them manually if needed. To do so:

Dropbox desktop app

  1. Click  (Dropbox icon) in your taskbar (Windows) or menu bar (Mac).
  2. Click  (folder) and navigate to the folder you’d like to remove the synced files from.
  3. Drag the existing file or folder outside of Dropbox and on to your Desktop.
  4. Drag the file from your Desktop back into the folder inside the folder in Dropbox.
Was this article helpful?

Let us know how why it didn't help:

Thanks for letting us know!

Thanks for your feedback!