Skip to content

Remove files that are no longer in the source directory? #1446

Answered by twpayne
poperigby asked this question in Q&A
Discussion options

You must be logged in to vote

chezmoi only looks at the current state of the source directory, it doesn't know anything about its history, and so can't tell if a file has been removed.

To get chezmoi to remove files, you need to create a .chezmoiremove file.

chezmoi takes particular care to make sure that it only removes files when explicitly requested by the user to reduce the chance of inadvertently deleting files.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@poperigby
Comment options

@Crocmagnon
Comment options

@gschintgen
Comment options

Answer selected by poperigby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants