Skip to content

Cleanup

Use this page when you want to remove the changes dot made to a machine. The safe first step is always dot clean; everything after that is optional and more destructive.

dot clean only removes symlinks managed by GNU Stow. It unstows the private overlay first when it is available, then the public packages.

Terminal window
dot clean

This does not remove packages, cloned repositories, pacman config, firewall rules, systemd user units, shell changes, generated agent instruction copies, logs, or backup files.

dot install and dot init move conflicting live files into backup paths instead of deleting them. Check the public/private repo backup directories and any Omarchy init backups before removing the repos.

Terminal window
ls ~/.config/dotfiles/backup
ls ~/.config/dotfiles-private/backup
ls ~/.config/*.dot-init-backup-*

Move back only the files you still want to keep.

Disable user timers/services that were enabled from these dotfiles.

Terminal window
systemctl --user disable --now dot-doctor-startup.timer
systemctl --user disable --now daily-volume-zero.timer
systemctl --user disable --now git-workflow-watch.timer git-workflow-watch.service
systemctl --user reset-failed git-workflow-watch.timer git-workflow-watch.service
systemctl --user daemon-reload

daily-volume-zero.timer only exists on laptop stow packages, and git-workflow-watch.* are obsolete legacy units, so these commands may report that some units are missing.

dot init runs dot agents-sync, which mirrors the global OpenCode agent instructions into other harnesses. Remove these only if you want those harnesses unmanaged too. Check for the dot agents-sync header before deleting anything you may have edited by hand.

Terminal window
grep -H "dot agents-sync" ~/.cursor/rules/global-agents.mdc ~/.claude/CLAUDE.md ~/.codex/AGENTS.md
rm -f ~/.cursor/rules/global-agents.mdc ~/.claude/CLAUDE.md ~/.codex/AGENTS.md

dot init adds managed ufw allow rules when ufw is installed. Delete only the rules you no longer want.

Terminal window
sudo ufw status numbered
sudo ufw delete <number>
sudo ufw reload

The managed rules are labelled in ufw status with their purpose, for example KDE Connect, Home Assistant, OpenCode server, LocalSend, and libvirt.

If dot setup-private-repo or dot init registered the private package repo, remove the include line and snippet manually.

Terminal window
sudoedit /etc/pacman.conf
sudo rm -f /etc/pacman.d/timmo-private.conf
sudo pacman -Sy

Remove this line from /etc/pacman.conf if present:

Include = /etc/pacman.d/timmo-private.conf

If your private config overrides DOT_PRIVATE_PACMAN_REPO_CONFIG or DOT_PRIVATE_PACMAN_MAIN_CONFIG, use those paths instead.

dot setup-private-repo also syncs a local file:// mirror from the private package repo config. If you want to remove that mirror and source clone too, check path= and mirror_path= in ~/.config/dotfiles-private/.dot-private-package-repo and remove only those directories.

Public/private pacman hooks are installed into /etc/pacman.d/hooks from stowed hook sources. Remove only hooks that came from these dotfiles.

Terminal window
ls ~/.config/pacman-hooks
ls /etc/pacman.d/hooks
sudo rm /etc/pacman.d/hooks/<hook-name>.hook

dot init sets the login shell to zsh when needed. Change it back if you no longer want zsh as the login shell.

Terminal window
chsh -s /bin/bash "$USER"

If init added /usr/bin/zsh to /etc/shells, leave it unless you know nothing else on the machine needs it.

dot init adds the managed Git include to your global Git config. Remove it if you no longer want Git to load the stowed dotfiles settings.

Terminal window
git config --global --fixed-value --unset-all include.path "~/.config/git/config.dotfiles"

dot init ensures en_GB.UTF-8 is enabled in /etc/locale.gen and runs locale-gen. Leave the locale in place unless you specifically want to remove it.

Terminal window
sudoedit /etc/locale.gen
sudo locale-gen

After the stowed links and system config are removed, delete cloned repos and generated state only if you no longer need them.

Terminal window
rm -rf ~/.config/dotfiles-private
rm -rf ~/.config/bootstrap ~/.config/waybar ~/.config/ghostty ~/.config/uwsm
rm -rf ~/.local/state/dot ~/.cache/dot

Private package repos and other private Git clones are configured by the private overlay. Review ~/.config/dotfiles-private/.dot-private-package-repo and ~/.config/dotfiles-private/dot-git.yml, then remove only clones and mirrors you no longer need.

If you removed Omarchy config directories that dot init replaces with managed repos, refresh the stock Omarchy defaults afterwards for any parts you want Omarchy to own again.

Terminal window
omarchy refresh waybar
omarchy refresh shell
omarchy refresh hyprland
omarchy refresh config ghostty/config
omarchy refresh config uwsm/env

Run omarchy refresh --help on the target machine for the exact refresh commands supported by that Omarchy version.

Do not remove ~/.config/dotfiles until you no longer need the dot binary, docs, or backup directory.

dot init installs the public/private package lists but does not track ownership of packages afterwards. Removing packages is intentionally manual. This command only covers the default public package list; if you override DOT_PUBLIC_PACKAGES_FILE, use that file instead.

Terminal window
comm -12 <(sort ~/.config/dotfiles/.dot-public-packages) <(pacman -Qq | sort)

Review that output, then remove only packages you no longer use.

Terminal window
sudo pacman -Rns <package>

For private packages, review the private package list before removing anything.

dot install and dot init may also install setup prerequisites such as stow, gum, or mise when they are missing. Remove those manually only if nothing else uses them.

dot init runs mise install, which can install language and CLI tool versions from the stowed mise config. Remove only versions you no longer use.

Terminal window
mise ls --installed
mise uninstall <tool@version>

dot init installs the GitHub CLI extensions listed in .dot-gh-extensions when gh is available. Remove only extensions you no longer want.

Terminal window
gh extension list
gh extension remove <owner/repo>

Run doctor after cleanup to see what managed state remains. It will report missing dotfiles pieces if the repo is partly removed, which is expected during a full uninstall.

Terminal window
dot doctor