Uninstall and restore backups
Remove the dotfiles and the bare repository, then restore the files the installer backed up.
On this page
Return your home directory to its state before the install.
Warning
These steps delete every tracked file in $HOME, including ~/.profile, ~/.bashrc, and ~/.ssh/config.
Restoring ~/.df-bak brings back only the files that the installer replaced.
Prerequisites
- Git and a POSIX
sh. - Changes you want to keep are committed and pushed, or copied elsewhere.
Check with
cd ~ && dotfiles status.
Steps
-
Review the files and plugin directories that the next step deletes:
cd ~ && git --git-dir="$HOME/.local/share/dotfiles" --work-tree="$HOME" ls-files -
Delete them:
cd ~ && git --git-dir="$HOME/.local/share/dotfiles" --work-tree="$HOME" ls-files -z | xargs -0 rm -rf -- -
Delete the bare repository; its Git hooks and
info/excludelink go with it.commandbypasses thermalias that the dotfiles define:command rm -rf ~/.local/share/dotfiles -
Restore the backups, then delete the backup directory:
cp -Rp ~/.df-bak/. ~/ && command rm -rf ~/.df-bakSkip this step if
~/.df-bakdoes not exist; the installer replaced no files. A path backed up twice holds only the later copy. -
Optional: delete the generated shell caches:
command rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/shell" -
Optional: remove mise and all its data, if the installer added it and you do not use it elsewhere:
mise implode
Empty directories from the tracked layout, such as ~/.config/sh, can remain; delete them by hand.
Verify
This command reports that the directory does not exist:
ls ~/.local/share/dotfiles
Start a new login shell; it loads your restored or system default configuration:
exec "$SHELL" -l