.. _rcc-nix-cleanup-ref: Cleanup Nix Store ================= Below is an example on how to cleanup nix store located at `/opt/rhodecode`. This can be also used to move RhodeCode to another machine keeping all the configuration options. 1) Download installer from our website. 2) Take not of your instances with versions when running `rccontrol status`:: - NAME: enterprise-1 - NAME: vcsserver-1 3) Stop control/supervisor:: rccontrol self-stop --force 4) Remove and disable instances:: sudo rm -rf /opt/rhodecode sudo rm -rf ~/.rccontrol/cache mv ~/.rccontrol/supervisor ~/.rccontrol/.supervisor mv ~/.rccontrol/enterprise-1 ~/.rccontrol/.enterprise-1 mv ~/.rccontrol/vcsserver-1 ~/.rccontrol/.vcsserver-1 5) Run installer again, and install control:: ./RhodeCode-installer-* 6) install VCSServer and Enterprise/Community again. Shortcut commands below to skip entering data:: rccontrol install --accept-license VCSServer '{"host":"127.0.0.1", "port": 9999}' rccontrol install --accept-license Enterprise '{"password":"secret", "email":"sup@rt.com", "username":"adm", "host":"127.0.0.1", "port": 9919, "database":"sqlite", "repo_dir":"/tmp"}' Please note that use of sqlite here is important, and shouldn't be changed despite using other type of Database. During a new installation if user would point to an existing database it would be re-created destroying of old data. Using sqlite the trick here is that new DB will be created on sqlite database file, not touching existing database. The installation step is only for creating the binaries again since nix store was cleaned. 7) Uninstall instances:: rccontrol uninstall enterprise-1 rccontrol uninstall vcsserver-1 8) Move back instances to their original state:: rccontrol self-stop --force rm -rf .rccontrol/supervisor mv .rccontrol/.supervisor .rccontrol/supervisor mv .rccontrol/.enterprise-1 .rccontrol/enterprise-1 mv .rccontrol/.vcsserver-1 .rccontrol/vcsserver-1 9) Restart control:: rccontrol self-init