BIRCH
Uninstalling BIRCH - birchconfig


From the BIRCH home directory, type

cd install-birch
./birchconfig.sh


(Warning: birchconfig will NOT work correctly if launched from a different directory!)

The main birchconfig window will appear:




Choose "Uninstall BIRCH" :

Uninstall prior to update
By default, Uninstall assumes that you are uninstalling the current version of BIRCH prior to installing an update. In this case, most of the BIRCH directories are deleted, including the binaries and libraries if "Uninstall binaries and libraries" is checked. 

Uninstall binaries and libraries - By default, Uninstall will delete both the BIRCH framework and the binaries prior to an update, so this box should always be checked. It exists primarily for testing purposes.

Permanent uninstall
The "Permanent uninstall" option takes the additional step of renaming the admin.uninstall directory as "admin". The admin directory contains scripts that will delete BIRCH access for each user on the system the next time each user logs in.


What is birchconfig actually doing for a permanent uninstall?
When they ran the 'newuser' script, all BIRCH users caused source lines to be added to their .cshrc, .login, .profile, .bash_login and .bash_profile files, which read commands from files in $BIRCH/admin. These source lines are embedded in an if statement that checks for the presence of the corresponding source files in $BIRCH/admin, and tries to execute them only if they are present. For example, the following lines were added by 'newuser' to the user's .cshrc file:
##################################################     #_BIRCH
# cshrc.source is a file that contains setup commands #_BIRCH
# for BIRCH users. The source command #_BIRCH
# causes it to be read and executed each time a new #_BIRCH
# c-shell is initiated. #_BIRCH
################################################## #_BIRCH
if (-e /home/psgendb/admin/cshrc.source) then #_BIRCH
source /home/psgendb/admin/cshrc.source #_BIRCH
endif
Therefore, if BIRCH is uninstalled, no error message will be generated at login or when opening a new shell. However, these source lines are now dead code.  They have no effect, but clutter up the .cshrc file.

The best compromise is to uninstall BIRCH, but leave in place a script called cshrc.source or profile.source so that, the next time the user logs in, cshrc.source or profile.source will delete these lines.  A dummy admin directory already exists in $BIRCH/admin.uninstall. This directory contains cshrc.source and profile.source files that grep through .cshrc, .login etc. and delete any line containing '#_BIRCH'. Simply rename this directory to 'admin' and users' accounts will be changed as they login.


Next, click on the "Uninstall BIRCH" button.  This procedure calls the UNINSTALL-birch.sh script to delete directories in the current BIRCH installation: The screen messages will look something like this:

BIRCH home dir: /home/birch
Running UNINSTALL-birch.sh
Deleting lines containing #_BIRCH from .login
Deleting lines containing #_BIRCH from .cshrc
Deleting lines containing #_BIRCH from .profile
Deleting lines containing #_BIRCH from .bash_profile
Deleting lines containing #_BIRCH from .bash_login
Deleting lines containing #_BIRCH from .bashrc
Done!
Logout and login again so that the changes can take effect.
If you wish to restore BIRCH access, type
Removing acedb
Removing acedb4.9l
Removing admin
Removing dat
Removing doc
Removing java
Removing local-generic
Removing manl
Removing ncbi
Removing pkg
Removing public_html
Removing script
Removing bin-solaris-sparc
Removing bin-solaris-amd64
Removing bin-linux-intel
Removing lib-solaris-sparc
Removing lib-solaris-amd64
Removing lib-linux-intel
Other BIRCH files and directories must be removed manually.
Note that BIRCH access for the BIRCH Administrator account is automatically removed as part of the uninstall processs. Later, if you update to a new version of BIRCH, BIRCH access will automatically be restored.  Finally, a message will pop up saying "Uninstall complete". Click OK.

A summary of the installation steps can be found in the BIRCH home directory in the files birchconfig.uninstall.log (overview of the install) and  birchconfig.screen  (messages from uninstall scripts that are also echoed to the screen).

At this point, the only  remaining BIRCH directories should be local, GenBank and PIR.


Please send suggestions of comments regarding this page to psgendb@cc.umanitoba.ca