📁 File Management

Project File Archiver

Archive completed projects, clean temp files, and compress to save space

★☆☆ Beginner 10-15 min January 12, 2025

Overview

Completed projects can take up significant disk space, especially those containing node_modules, build artifacts, and other temporary files. Claude can help you intelligently clean up these files, preserve important content, and package for archiving, saving space while making it easy to find later.

Use Cases

  • Archive completed development projects
  • Clean up temporary files and caches from design projects
  • Organize learning projects while keeping notes and code
  • Compress long-unused projects to save space

Steps

Step 1: Analyze Project Structure

Have Claude first understand the project content and size.

Please analyze the ~/Projects/old-website project:
- Total file size
- Largest files and folders
- Temporary files that can be safely deleted (node_modules, .cache, build, etc.)
- Estimate how much space can be saved after cleanup

Step 2: Clean Temporary Files

Delete unnecessary files while keeping source code and documentation.

Please clean up temporary files in the project:
- Delete node_modules, .next, dist, build folders
- Delete .DS_Store, Thumbs.db and other system files
- Delete .log and .cache files
- Keep package.json, README.md and other important files
- Tell me what was deleted and how much space was saved

Step 3: Create Archive Documentation

Generate a README file to record project information.

Please create ARCHIVE_INFO.md in the project root directory containing:
- Project name and description
- Archive date
- Tech stack (identified from package.json or code)
- Important notes (how to restore, dependency versions, etc.)
- Original project size and archived size

Step 4: Compress and Package

Package the cleaned project into a compressed file.

Please package the project:
- Use tar.gz format for compression
- Include date in filename: old-website-archive-20250112.tar.gz
- Save to ~/Archives folder
- Verify archive integrity
- Calculate and record SHA256 checksum

Step 5: Organize Archive Directory

Organize all archived files by year.

Please organize the ~/Archives folder:
- Create subfolders by year (2024, 2025, etc.)
- Move archive files to corresponding year folders
- Create an index.md file listing all archived projects
- Sort by date, including project name, size, and archive date

Warning: Make sure the project truly no longer needs active development before archiving! It's best to keep the original folder for a while after compression, then delete after confirming everything is correct.

Tip: For particularly important projects, you can create two archives: one keeping all files (including node_modules), and one with only source code, just in case you need to return to the exact same environment.

Common Questions

Q: How do I restore an archived project? A: Decompress the archive, then follow the instructions in ARCHIVE_INFO.md to install dependencies (like running npm install).

Q: What if the compression ratio is low? A: Some files (like images, videos, already compressed files) don't compress well. The main benefit comes from deleting node_modules and other regeneratable files.

Q: Can I archive to cloud storage? A: Yes. After compression completes, you can have Claude upload the archive to mounted cloud storage, or use the cloud service's command-line tool.