How to Stop Ubuntu from Automatically Extracting Zip Files

The Unwanted Expansion

When you download a compressed `.zip` or `.tar.gz` archive on Ubuntu (using the standard GNOME desktop environment), you might expect to simply view its contents when you double-click it. However, depending on your system configuration and which specific archive manager is set as the default handler in Nautilus (the file manager), double-clicking an archive file might cause Ubuntu to instantly extract the entire contents of the archive into a new folder in your current directory. If you are downloading a massive 5GB zip file full of nested directories just to check a single text file inside it, this automatic extraction is incredibly frustrating and wastes both time and disk space.

Changing the Default Double-Click Behavior

To preview the contents of an archive rather than dumping them onto your drive, you need to stop Ubuntu from automatically extracting zip files and ensure they open in the Archive Manager GUI.

Open Nautilus (your Files app) and locate any `.zip` file. Do not double-click it. Instead, right-click the file and select Properties. In the Properties window, click on the Open With tab at the top. You will see a list of applications. The application currently set as default will be highlighted. If it is set to a utility like “Extract Here” or a command-line extractor, that is the cause of the problem. Scroll through the list and select Archive Manager (this is the GUI application, often called `file-roller` under the hood). Click the Set as default button at the bottom of the window. Now, close the Properties window. The next time you double-click a zip file, it will open cleanly in the Archive Manager window, allowing you to browse the contents and selectively 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.