JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
about 1 month ago11 views
💻Technology

TL;DR Summary

* The Reality Check: Do not delete your .env files. Those contain your local environment variables, API keys, and uncommitted secrets. If you delete them, you will permanently lose access to local configurations that are not backed up in your Git repositories.

* The Cleanup: You can use a fast PowerShell script to recursively purge .venv and node_modules across your Windows directories to save space.

* The Backup List: Beyond the standard media folders, you must explicitly target hidden developer dotfiles (.ssh, .gitconfig) and AppData configurations for your specific tools.

1. The Danger of .env

You specified wanting to delete .env alongside .venv and node_modules. This is a critical mistake. Dependencies like node_modules and .venv are ephemeral; you can rebuild them instantly with npm install or pip install.

Your .env files are local state. Unless you are using a cloud secrets manager (like AWS Secrets Manager or HashiCorp Vault) and have zero local-only keys, deleting these will break your development environments on the new PC. Leave them alone.

2. The Dependency Cleanup Script

PowerShell's Get-ChildItem can be notoriously slow when scanning an entire user profile. A faster approach is using standard command-line directory traversal.

Open Command Prompt (not PowerShell) and run these commands from your user directory to ruthlessly hunt down and delete the heavy dependency folders:

cd C:\Users\<YourUsername>

FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rd /s /q "%d"

FOR /d /r . %d in (.venv) DO @IF EXIST "%d" rd /s /q "%d"

Note: This will output errors for paths that are too long or locked, which is normal. It will still delete the targets.

3. Identifying the "Useful Stuff"

When migrating an engineering machine, the most painful things to lose are not documents, but configuration states. Ensure you are targeting these specific hidden paths in your user directory (C:\Users\<YourUsername>\):

* .ssh: Contains your id_rsa, id_ed25519 keys, and your config file for server aliases.

* .gitconfig: Your global Git aliases and credentials.

* .aws or .azure: Cloud CLI credentials and session tokens.

* .gnupg: If you sign your Git commits, your GPG keys live here.

* Tool Configurations (Opencode, Gemini, Antigravity): Since these are Windows-side tools, their settings and local databases are almost certainly stored in C:\Users\<YourUsername>\AppData\Roaming\ or AppData\Local\. You need to manually copy those specific application folders.

4. The Bulk Archive Script (Using 7-Zip)

Since you already have 7-Zip installed, do not use the native Windows compression—it will choke on the size of your Downloads and Documents folders. You can use the 7-Zip command-line tool to bulk archive everything into a highly compressed, single file ready for your phone.

Open PowerShell, ensure the path to 7-Zip is correct, and run this block:

# Define the 7-Zip executable path

$7z = "C:\Program Files\7-Zip\7z.exe"

# Define your source directories

$home = "C:\Users\<YourUsername>"

$sources = @(

"$home\Documents",

"$home\Downloads",

"$home\Pictures",

"$home\Music",

"$home\.ssh",

"$home\.gitconfig",

"$home\AppData\Roaming\opencode",

"$home\AppData\Roaming\Gemini",

"$home\AppData\Roaming\antigravity"

)

# Define the output archive

$output = "$home\Desktop\Windows_Backup.7z"

# Execute the compression (using Fast compression -mx=3 to save time)

& $7z a $output $sources -mx=3 -m0=LZMA2 -mmt=on

Once the Windows_Backup.7z file is generated on your desktop, you can push it to your phone using the exact same adb push or FTP

method you are using for the WSL ext4.vhdx file.

← Back to timeline