How to Stop Ubuntu from Automatically Extracting Archives

The Archive Clutter

In Ubuntu, the default archive manager (often File Roller, integrated closely with Nautilus) is designed to make handling compressed files as seamless as possible. Sometimes, depending on your specific file associations or if you double-click a `.zip` or `.tar.gz` file downloaded from a web browser, Ubuntu might automatically extract the entire contents of the archive into a new folder in the current directory, rather than simply opening the archive for inspection. If you download a massive source code repository or a large dataset just to pull a single file out of it, this automatic extraction wastes gigabytes of disk space and clutters your Downloads folder.

Changing Default Archive Behavior

To keep your file system clean and stop Ubuntu from automatically extracting compressed archives when you double-click them, you must ensure the default action is set to ‘Open’ rather than ‘Extract’.

The behavior usually stems from how Nautilus handles executable actions. Open the Files (Nautilus) application. Navigate to any folder containing a `.zip` file. Right-click the `.zip` file and select Properties from the context menu. In the Properties window, click on the Open With tab. You will see a list of applications. Ensure that Archive Manager is selected and highlighted. If it is not the default, click the Set as default button at the bottom of the window. Next, click the hamburger menu (three horizontal lines) in the top right of the main Files window and select Preferences. Go to the Behavior tab. Under the “Executable Text Files” section, ensure the option is set to Display them or Ask what to do, rather than “Run them.” Now, double-clicking an archive will merely open a viewing window, allowing you to extract only what you need.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.