Skip to main content

unzone

A simple, safe utility to find and delete Zone.Identifier files.

What are Zone.Identifier files?

When files are downloaded from the internet or transferred from other security zones in Windows, the OS creates hidden :Zone.Identifier alternate data stream files. When these files are copied to Linux or Mac systems (or accessed via WSL), they appear as separate files with the suffix :Zone.Identifier.

This tool helps clean them up.

Features

  • ✅ Safe by default - Non-recursive by default, requires -r flag for subdirectories
  • ✅ Confirmation prompts - Always asks for confirmation before deletion (configurable)
  • ✅ Configurable - Set your preferred behavior globally
  • ✅ Cross-platform - Works on Windows, Linux, and macOS
  • ✅ No dependencies - Uses only Python standard library
  • ✅ Verbose mode - See exactly what's being processed
  • ✅ Smart error handling - Handles permission issues gracefully

Installation

pip install unzone

Usage

Basic usage (interactive)

# Scan current directory only (non-recursive)
unzone

# Scan current directory and all subdirectories
unzone -r

# Scan specific directory (non-recursive)
unzone /path/to/directory

# Recursively scan specific directory
unzone -r /path/to/directory

# See detailed output
unzone --verbose

Configuration

# Configure default behavior (one-time setup, runs first time you use unzone)
unzone --configure

This lets you choose whether to always ask for confirmation or auto-delete. Your choice is saved globally.

Command-line flags

# Recursive scan
unzone -r
unzone --recursive

# Force deletion without confirmation (for scripts)
unzone --force

# Force confirmation prompt (override config when set to automatically delete)
unzone --confirm

# Verbose output
unzone --verbose

# Show version
unzone --version

# Show help
unzone --help

Examples

# Clean current directory only
unzone

# Clean current directory and all subdirectories
unzone -r

# Clean Downloads folder (non-recursive)
unzone ~/Downloads

# Recursively clean Downloads folder
unzone -r ~/Downloads

# Automated cleanup in a script (recursive)
unzone -r ~/Downloads --force

# Override auto-delete config for this run
unzone ~/Downloads --confirm

Configuration File

Configuration is stored at:

  • Linux/Mac: ~/.config/unzone/config.json
  • Windows: %LOCALAPPDATA%\unzone\config.json

You can edit this file manually or use unzone --configure.

How It Works

  1. Scans the specified directory (use -r for recursive subdirectory scanning)
  2. Finds all files ending with Zone.Identifier
  3. Asks for confirmation (unless configured otherwise or --force is used)
  4. Deletes the files and reports results

Safety Features

  • Non-recursive by default - Only scans the current directory unless -r is specified
  • Confirmation prompts - Won't delete anything without your approval (by default)
  • Graceful error handling - Continues processing even if some files can't be deleted
  • Clear reporting - Shows exactly what was deleted and any errors
  • Targeted deletion - Only removes files ending with Zone.Identifier

License

MIT License - See LICENSE file for details

Contributing

Issues and pull requests welcome at https://github.com/spenquatch/unzone

Metadata

Release files for unzone 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unzone 0.1.0
File Size Uploaded Provenance Actions
unzone-0.1.0.tar.gz 6.5 kB With provenance Details for unzone-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unzone 0.1.0
File Interpreter ABI Platform Actions
unzone-0.1.0-py3-none-any.whl Python 3 none any Details for unzone-0.1.0-py3-none-any.whl

Total release size: 13.6 kB

Release files / unzone-0.1.0.tar.gz

Download URL unzone-0.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2e84ff7a5c809bc095ca14270b40b464f278392f9c869fc428e3de0beae7f770
BLAKE2b-256 checksum
How to use checksums
4bead3c9354b5e3fd4b6834217491e0962b9e5ffbd9921472d05957c27da8dce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2025.

Transparency log

Release files / unzone-0.1.0-py3-none-any.whl

Download URL unzone-0.1.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a83452fe98153a53f8ea63e6a91f50b4bc71c5840b9d08793fb4e64930014e0
BLAKE2b-256 checksum
How to use checksums
84380aaf49d12ea2d2ea66ba80f83d89723cb878d0b1c59c7f5dc505db3d1894
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2025.

Transparency log

Security for unzone 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for unzone-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page