unmanaged command lists all files in your destination directory (typically your home directory) that are not managed by chezmoi.
Usage
Description
Theunmanaged command shows files that exist in your home directory but are not tracked by chezmoi. This is useful for:
- Finding files you might want to add to chezmoi
- Identifying files that should be in
.chezmoiignore - Cleaning up temporary or unnecessary files
- Auditing your dotfile coverage
.chezmoiignore are not shown as unmanaged.
Flags
Exclude entry types (comma-separated:
dirs, files, remove, scripts, symlinks, always, encrypted, externals, templates).Include only specified entry types (comma-separated:
dirs, files, remove, scripts, symlinks, always, encrypted, externals, templates).Use NUL character as path separator. Useful for piping to
xargs -0.Path style to use. Options:
relative- Paths relative to home directoryabsolute- Absolute paths
Print paths as a tree structure.
Examples
List all unmanaged files
List with absolute paths
List in tree format
List unmanaged files in a specific directory
~/.config.
List only unmanaged regular files
Use with xargs
Common Workflows
Find dotfiles to add
Find configuration files that aren’t managed:Add important unmanaged files
Identify files to ignore
Find files that should be in.chezmoiignore:
Clean up unmanaged files
Output Examples
Default output
Tree view
In specific directory
Filtering Examples
Find large unmanaged files
Find unmanaged config files
Count unmanaged files
Understanding .chezmoiignore
Files matching patterns in .chezmoiignore won’t appear in unmanaged output:
Practical Examples
Audit dotfile coverage
Check which config files aren’t managed:Find unmanaged scripts
Generate ignore patterns
Create.chezmoiignore entries from unmanaged files:
Interactive file addition
Performance Note
Theunmanaged command may be slow on home directories with many files. To speed it up:
- Add common directories to
.chezmoiignore(Downloads, Documents, etc.) - Specify a subdirectory:
chezmoi unmanaged ~/.config - Exclude file types:
chezmoi unmanaged --exclude=dirs