How to Reset Your Home Directory to Omarchy Defaults: Complete Guide
To reset your home directory to Omarchy defaults, run the omarchy-refresh-config command with the target configuration path, which validates the source file, creates a timestamped backup of your existing settings, and copies the default from the repository.
The basecamp/omarchy repository provides a deterministic way to restore default configurations without losing your customizations. Whether you need to reset a single component or your entire dotfiles tree, Omarchy's refresh utilities handle the heavy lifting while preserving your existing files through an automated backup system.
Understanding the Refresh Mechanism
At the heart of Omarchy's reset capability lies the omarchy-refresh-config script located in bin/omarchy-refresh-config. This utility serves as the single entry point for restoring any default configuration shipped with the repository.
When you invoke omarchy-refresh-config <path>, the script performs three critical operations:
- Validation: Confirms the requested file exists under
${OMARCHY_PATH}/config - Backup: Renames any existing user file to
<filename>.bak.<timestamp>using$(date +%s) - Restoration: Copies the default file from
${OMARCHY_PATH}/config/<path>to$HOME/.config/<path>usingcp -ato preserve permissions
This architecture ensures that you cannot accidentally overwrite configurations without leaving a recoverable trail. The behavior is enforced by the test suite in test/shell.d/refresh-config-test.sh, which validates both successful copy operations and proper error handling when source files are missing.
Resetting Individual Components
For common workflow components, Omarchy provides convenience wrappers that call omarchy-refresh-config with the appropriate relative paths. These wrappers eliminate the need to memorize the exact file locations within the repository structure.
Hyprland Window Manager
To restore Hyprland to its default state, including bindings, monitors, and input settings:
omarchy-refresh-hyprland
This wrapper internally invokes omarchy-refresh-config for hypr/hyprland.lua, hypr/bindings.lua, hypr/monitors.lua, hypr/input.lua, hypr/looknfeel.lua, and hypr/autostart.lua. You can also target specific Hyprland modules directly:
omarchy-refresh-config hypr/bindings.lua
omarchy-refresh-config hypr/monitors.lua
Terminal Multiplexer (tmux)
Reset your terminal environment with:
omarchy-refresh-tmux
This restores tmux/tmux.conf from the repository defaults, backing up your current .config/tmux/tmux.conf with a timestamp before replacement.
Browser Configuration (Chromium)
To reset Chromium flags and settings managed by Omarchy:
omarchy-refresh-chromium
This targets the Chromium configuration files within the ${OMARCHY_PATH}/config directory structure.
Resetting Your Entire Home Directory
To completely restore all Omarchy-managed dotfiles to their repository defaults, you must invoke omarchy-refresh-config for every component in the ${OMARCHY_PATH}/config tree. First, consider creating a comprehensive backup of your current .config directory:
mv "$HOME/.config" "$HOME/.config.backup.$(date +%s)"
Then systematically reset each configuration component:
# Hyprland ecosystem
omarchy-refresh-config hypr/autostart.lua
omarchy-refresh-config hypr/bindings.lua
omarchy-refresh-config hypr/input.lua
omarchy-refresh-config hypr/looknfeel.lua
omarchy-refresh-config hypr/hyprland.lua
omarchy-refresh-config hypr/monitors.lua
# Terminal and shell
omarchy-refresh-config tmux/tmux.conf
omarchy-refresh-config omarchy/shell.json
Alternatively, use a single command to iterate over all shipped configurations automatically:
while IFS= read -r -d '' file; do
rel="${file#${OMARCHY_PATH}/config/}"
omarchy-refresh-config "$rel"
done < <(find "${OMARCHY_PATH}/config" -type f -print0)
This approach respects the same safety mechanisms as individual commands, creating timestamped backups for every file that would be overwritten.
Summary
Resetting your home directory to Omarchy defaults relies on a robust refresh architecture that prioritizes data safety:
- Core utility: The
bin/omarchy-refresh-configscript handles all reset operations in thebasecamp/omarchyrepository - Automatic backups: Existing files are preserved with Unix timestamps before replacement
- Component-specific wrappers: Commands like
omarchy-refresh-hyprlandandomarchy-refresh-tmuxprovide shortcuts for common reset operations - Batch operations: You can loop over the entire
${OMARCHY_PATH}/configdirectory to reset all managed dotfiles simultaneously - Validation: The system verifies source files exist before attempting any destructive operations
Frequently Asked Questions
What happens to my existing configuration files when I run a reset command?
Omarchy automatically creates timestamped backups using the format <filename>.bak.<timestamp> before overwriting any existing files. The timestamp is generated using $(date +%s), ensuring each backup has a unique identifier. Your original configurations remain in $HOME/.config with the .bak. prefix, allowing you to manually restore them if needed.
Can I reset only specific parts of my Omarchy installation?
Yes. Instead of resetting your entire home directory, you can target specific components by passing the relative path to omarchy-refresh-config. For example, omarchy-refresh-config hypr/bindings.lua resets only your Hyprland key bindings while leaving other configurations untouched. Convenience wrappers like omarchy-refresh-tmux provide an even simpler interface for common components.
Where does Omarchy store the default configuration files used for reset operations?
Default configurations reside in ${OMARCHY_PATH}/config, where OMARCHY_PATH points to your local clone of the basecamp/omarchy repository. When you run omarchy-refresh-config, the script constructs the source path by appending your requested component to this base directory, then copies files to the corresponding location under $HOME/.config.
Is there a way to preview what files will be changed before resetting?
While omarchy-refresh-config does not include a dry-run flag, you can inspect the ${OMARCHY_PATH}/config directory to see which files Omarchy manages. List the repository's config tree with find ${OMARCHY_PATH}/config -type f to identify potential targets. The script will only modify files that exist in both the repository and your home directory, creating backups before any changes occur.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →