check
When you run tori check
, tori will look into your configuration files and perform two tasks:
- Compare the files inside the
base
directory to the corresponding files on the system - Compare the package list in the
packages
file to the installed packages
If any divergence is found, it will by default prompt you on what action to take.
Command line options
By default, tori won’t perform any changes to the system without asking you first. However, you might prefer not to be asked, or maybe you want to automate your tori calls.
For such non-interactive use, the following options are available:
--overwrite-config
: Overwrite configuration files and install system packages--overwrite-system
: Overwrite system files and uninstall system packages
Say you have package tmux
in your configuration, but it is not installed on the system. Running tori check --overwrite-system
would install it. With --overwrite-config
, the same situation would result in the package being removed from your configuration.
Conversely, if tmux
is not in your configuration, but is installed, running check
with --overwrite-system
would uninstall it and with --overwrite-config
it would add it to your configuration.
Files work differently because you are not supposed to have your whole filesystem in your tori configuration, but only the files you care about.
If you have a file in your tori configuration but its counterpart is missing or differs, with --overwrite-system
the file would be copied over, overwriting as needed. With --overwrite-config
, the file would be removed from your configuration.
This means tori only copies files to the system, but never removes them. Removing a file from your configuration will only cause tori to now consider it “untracked” and ignore it.