A powerful tool to find and interactively resolve duplicate files created by pCloud sync conflicts.
When pCloud encounters sync conflicts (e.g., when the same file is modified on multiple devices), it creates duplicate files with " [conflicted]" or " (conflicted)" in the filename. This tool helps you:
- π Find all conflicted file pairs automatically
- β‘ Compare them intelligently using SHA256 hashing or byte comparison
- π€ Auto-delete identical duplicates safely
- π― Resolve real conflicts interactively with rich metadata and diff display
- π Track conflicts persistently across multiple runs with JSON logging
- Rich metadata display: File sizes, modification times, full paths
- Colored diff viewer: Beautiful syntax-highlighted diffs for text files
- Smart file detection: Automatically detects text vs binary files
- Multiple resolution options: Keep original, keep conflicted, skip, or view files
- Safe preview mode:
--resolve --dry-runto preview all conflicts first
- Smart comparison: SHA256 hashing with size optimization for performance
- Perfect workflows: Combine
--auto-delete+--resolvefor complete automation - Cloud-aware scanning: Automatically skips cloud storage and network mounts
- Unicode support: Handles international characters, emojis, and special symbols
- Files without extensions: Perfect handling of scripts, configs, makefiles
- Multiple safety modes: Dry-run, confirmation prompts, or auto-delete
- Never touches originals: Only processes
[conflicted]and(conflicted)files - Comprehensive testing: 17+ test scenarios covering all edge cases
- Progress tracking: Real-time progress with smooth spinner animation
- Error handling: Graceful handling of permissions and edge cases
# Download the latest universal binary (works on Intel & Apple Silicon)
curl -L -o pCloudSync-deconflict https://github.com/rcfa/pCloudSync-deconflict/releases/latest/download/pCloudSync-deconflict
chmod +x pCloudSync-deconflict
./pCloudSync-deconflict --versiongit clone https://github.com/rcfa/pCloudSync-deconflict.git
cd pCloudSync-deconflict
chmod +x pCloudSync-deconflict.py
./pCloudSync-deconflict.py --helpgit clone https://github.com/rcfa/pCloudSync-deconflict.git
cd pCloudSync-deconflict
make install # Installs to /usr/local/bin# Check version
./pCloudSync-deconflict --version
# Preview all conflicts without making changes
./pCloudSync-deconflict -r --resolve --dry-run ~/Documents
# Perfect workflow: auto-delete identical, resolve conflicts interactively
./pCloudSync-deconflict -r --auto-delete --resolve ~/Documents
# Just clean up identical files automatically
./pCloudSync-deconflict -r --auto-delete ~/Documents# Basic scanning
./pCloudSync-deconflict /path/to/scan # Non-recursive scan
./pCloudSync-deconflict -r /path/to/scan # Recursive scan
# Multiple directories (v1.2.0+)
./pCloudSync-deconflict path1 path2 path3 # Scan multiple directories
./pCloudSync-deconflict -r ~/Documents ~/Desktop # Recursive multi-directory scan
# Conflict resolution
./pCloudSync-deconflict -r --resolve /path # Interactive resolution
./pCloudSync-deconflict -r --resolve --dry-run # Preview conflicts
# Automatic cleanup
./pCloudSync-deconflict -r --auto-delete /path # Auto-delete identical files
./pCloudSync-deconflict -r --dry-run /path # Preview all actions# Comparison methods
-m hash # SHA256 hash comparison (default, faster)
-m byte # Byte-by-byte comparison (slower, thorough)
# Device boundaries
--cross-device # Include network/cloud storage (slower)
--include-local-mounts # Include external drives, exclude cloud
# Output and progress
-o custom.json # Custom output file for conflict tracking
--no-progress # Disable progress indicator
-v, --verbose # Show detailed comparison results
# Perfect combinations
--auto-delete --resolve # Auto-clean identical, resolve different
--auto-delete --resolve --dry-run # Preview complete workflowAn orphan is a [conflicted]/(conflicted) file whose original is missing β so it
forms no pair. Earlier versions silently ignored these; they are now detected, logged,
and can be cleaned up:
# Interactive: --resolve now handles BOTH conflicts and orphans in one pass
--resolve # Resolve conflicts AND orphans interactively
--resolve-conflicts # Only conflicts (pairs with different content)
--resolve-orphans # Only orphans
# Non-interactive orphan actions (mutually exclusive)
--normalize-orphans # Rename orphans, stripping the conflict marker
--nuke-orphans # Delete orphans outrightWith no orphan option, orphans are reported and logged but left untouched. When normalizing, if the stripped name is already taken the file is treated as a real conflict (re-paired and compared) instead of being overwritten.
A directory whose name carries a conflict marker is detected and reported loudly but never acted on automatically β it may be an app bundle, a nested tree, or something else that needs case-by-case handling. The scan still descends into it, so conflicted files nested inside are found normally.
# Preview what needs attention
./pCloudSync-deconflict -r --auto-delete --resolve --dry-run ~/
# Execute the cleanup and resolution
./pCloudSync-deconflict -r --auto-delete --resolve ~/# First, see all conflicts with rich details
./pCloudSync-deconflict -r --resolve --dry-run ~/Documents
# Then resolve them interactively
./pCloudSync-deconflict -r --resolve ~/Documents# Just remove obvious duplicates
./pCloudSync-deconflict -r --auto-delete ~/Documents# Handle Unicode filenames, files without extensions
./pCloudSync-deconflict -r --resolve ~/Desktop# Clean up common sync conflict areas in one run
./pCloudSync-deconflict -r --auto-delete ~/Documents ~/Desktop ~/Downloads
# Preview conflicts across all project directories
./pCloudSync-deconflict -r --dry-run ~/Projects/web ~/Projects/mobile ~/Projects/backendThe tool includes a comprehensive test suite:
# Run all tests (safe - uses dry-run mode)
./run-tests.sh
# Test specific scenarios
./pCloudSync-deconflict test-data/unicode-files -r --resolve --dry-run
./pCloudSync-deconflict test-data/root-level --auto-delete --dry-run
# Recreate test data
cd test-data && ./create-test-files.shTest coverage includes:
- β 17 different conflict scenarios
- β Unicode filenames (cafΓ©, εε‘, emojis)
- β Files with and without extensions
- β Multi-level directory nesting
- β Binary and text files
- β Large files (1000+ lines)
- β Edge cases (empty files, orphaned conflicts)
- Recursively scans directories for files containing " [conflicted]" or " (conflicted)"
- Matches each conflicted file with its original counterpart
- Skips cloud storage mounts automatically for better performance
- Compares file sizes first (quick elimination)
- Uses SHA256 hashing for content comparison (default)
- Detects text vs binary files automatically
- Identical files: Auto-deleted (with
--auto-delete) or confirmed - Different files: Interactive resolution (with
--resolve) or logged to JSON - Orphans (conflicted file, no original): normalized/nuked/resolved interactively, or logged
- Conflicted directories: reported loudly for manual handling, never auto-modified
When using --resolve, for each conflict you can:
- View rich metadata: Sizes, modification times, paths
- See colored diffs: For text files with syntax highlighting
- Choose resolution: Keep original, keep conflicted, skip, or view files
- Preview safely: Use
--dry-runto see all conflicts first
The tool maintains a conflicted_files_to_review.json file that:
- Lives in a fixed location β
~/Library/Application Support/pCloudSync-deconflict/by default, so tracking is independent of the working directory you launch from (override with-o) - Accumulates conflicts across multiple runs
- Tracks resolution status (active vs resolved)
- Includes rich metadata: Sizes, timestamps, hashes, reasons
- Validates existence of old conflicts on each run
- Provides history for systematic conflict management
- β
Never deletes original files - only processes
[conflicted]copies - β Multiple confirmation levels - dry-run, prompts, or auto modes
- β Comprehensive logging - detailed JSON tracking of all operations
- β Permission handling - gracefully skips protected directories
- β Unicode safety - proper handling of international filenames
- β Atomic operations - safe file renaming and deletion
- macOS: 10.12 or later
- Python: 3.6+ (for source execution)
- PyInstaller: Automatically installed by Makefile
# Build universal binary (recommended)
make # Same as 'make build-universal'
make build-universal # Works on Intel & Apple Silicon
# Build for current architecture only
make build-macos
# Create distribution package
make package
# Install system-wide
make install # Installs to /usr/local/bin
make uninstall # Removes from /usr/local/bin
# Clean build artifacts
make clean- v1.4.0 (Latest): Detect and handle orphaned conflicted files (no original) via
--resolve/--resolve-orphans/--normalize-orphans/--nuke-orphans; loudly report conflicted directories; orphans and directories are tracked in the JSON. Fixes a bug where orphan-only runs exited without doing anything - v1.3.0: Conflict-tracking file now lives in a fixed location (
~/Library/Application Support/pCloudSync-deconflict/) so it no longer depends on the working directory the tool is launched from - v1.2.1: Added support for
(conflicted)pattern in addition to[conflicted] - v1.2.0: Support for processing multiple directories in a single run
- v1.1.1: Added
--versionoption for standard CLI behavior - v1.1.0: Major update with interactive conflict resolution and comprehensive test suite
- v1.0.0: Initial stable release with auto-delete and JSON tracking
Found a bug or have a feature request?
- Check existing issues: GitHub Issues
- Run the test suite:
./run-tests.shto verify functionality - Create detailed reports: Include version (
--version) and test results
MIT License - See LICENSE file for details.
Developed to solve real-world pCloud sync conflicts on macOS with a focus on safety, usability, and comprehensive conflict resolution.
π― Ready to clean up your pCloud conflicts?
Download the latest release and start with:
./pCloudSync-deconflict -r --auto-delete --resolve --dry-run ~/