Wiki

Clone wiki

weewx-wd / Uninstall Instructions

Uninstalling weewx-WD

The method used to uninstall weewx-WD will depend on the weewx-WD and weewx versions installed and the method by which weewx-WD was installed. The available uninstall methods are:

  1. weewx-WD v1.0.0 or later. If weewx-WD was installed using the wee_extension utility or setup.py then weewx-WD can be uninstalled either manually, or using the weewx wee_extension utility or setup.py. The use of wee_extension or setup.py will be determined by the currently installed version of weewx; for weewx v3.2.0 or later wee_extension must be used, for earlier versions of weewx setup.py must be used. If weewx-WD was installed manually then it must be uninstalled manually. Manual uninstallation can be used for any version of weewx. If possible, the preferred uninstallation method is to use the wee_extension utility or setup.py.

    Note: The wee_extension utility was introduced in weewx v3.2.0 to replace the extension management capabilities in setup.py. Both wee_extension and setup.py are compatible in terms of extension installation and uninstallation.

    Note: You can check whether weewx-WD was installed using the wee_extension utility or setup.py by using one of the following commands:

    For weewx v3.2.0 or later:

    $ wee_extension --list
    

    For weewx v3.1.0 or earlier:

    $ ./setup.py list-extensions
    
  2. weewx-WD v0.9.x. Irrespective of the weewx version installed, weewx-WD must be uninstalled manually using the Uninstalling legacy weewx-WD instructions below.

Note: weewx-WD v0.9.x is also referred to as legacy weewx-WD.

Uninstalling weewx-WD using the wee_extension utility

To uninstall weewx-WD using the wee_extension utility:

  1. Confirm that weewx-WD was installed as an extension:

    $ wee_extension --list
    

    if weewx-WD was installed as an extension you will see an entry for weewx-WD in the output similar to the following:

    Extension Name    Version   Description
    weewx-WD          1.0.3     weewx support for Weather Display Live, SteelSeries Gauges and Carter Lake/Saratoga weather web site templates.
    

    if this is the case uninstallation can occur using the wee_extension utility otherwise a manual uninstallation is required. To uninstall weewx-WD manually follow the steps at Uninstalling weewx-WD manually.

  2. Stop weewx:

    $ sudo /etc/init.d/weewx stop
    

    or

    $ sudo service weewx stop
    
  3. Uninstall the weewx-WD extension:

    $ wee_extension --uninstall=weewx-WD
    
  4. weewx-WD has now been removed from the system although the weewx-WD database will remain. To remove the weewx-WD database:

    if using SQLite:

    $ sudo rm $SQLITE_ROOT/weewxwd.sdb
    

    if using MySQL:

    $ mysql -u user -p
    mysql> DROP DATABASE weewxwd;
    mysql> quit;
    
  5. It is possible that depending on any customisation of the weewx-WD installation, weewx-WD skin remnants may remain as remnants in weewx.conf. For these reasons, it may be advisable to confirm that weewx-WD has been fully removed from the system. To confirm that weewx-WD has been properly removed from the system:

    • Confirm the following folders have been deleted:

      • $SKIN_ROOT/Clientraw
      • $SKIN_ROOT/PWS
      • $SKIN_ROOT/StackedWindRose
      • $SKIN_ROOT/SteelGauges
      • $SKIN_ROOT/Testtags

      if the folders have not been removed they may be removed using (as required):

      $ sudo rm -R $SKIN_ROOT/Clientraw $ sudo rm -R $SKIN_ROOT/PWS $ sudo rm -R $SKIN_ROOT/StackedWindRose $ sudo rm -R $SKIN_ROOT/SteelGauges $ sudo rm -R $SKIN_ROOT/Testtags

    • Confirm that all weewx-WD content has been removed from weewx.conf. Edit weewx.conf:

      $ vi weewx.conf

      and confirm that the following have been removed:

      • [[wdTesttags]], [[wdPWS]], [[wdClientraw]], [[wdStackedWindRose]] and [[wdSteelGauges]] have been removed from [StdReport]

      • [[weewxwd_sqlite]] and [[weewxwd_mysql]] have been removed from [Databases]

      • [[wd_binding]]* has been removed from [DataBindings]*

      • [weewx-WD] has been removed

      • user.weewxwd3.WdWXCalculate has been removed from process_services in [Engine]

      • user.weewxwd3.WdArchive has been removed from archive_services in [Engine]

      If the above have not been removed then use the editor to manually remove them.

  6. weewx-WD has now been fully removed from the system and weewx may be started:

    $ sudo /etc/init.d/weewx start
    

    or

    $ sudo service weewx start
    

Uninstalling weewx-WD using setup.py

To uninstall weewx-WD using setup.py:

  1. Confirm that weewx-WD was installed as an extension:

    $ ./setup.py list-extensions
    

    If weewx-WD was installed as an extension you will see weexwd in the output similar to the following:

    layout type is py
    layout is
    ....
    ....
    weewxwd
    

    If this is the case uninstallation can occur using setup.py otherwise a manual uninstallation is required. To uninstall weewx-WD manually follow the steps at Uninstalling weewx-WD manually.

  2. Stop weewx:

    $ sudo /etc/init.d/weewx stop
    

    or

    $ sudo service weewx stop
    
  3. Uninstall the weewx-WD extension:

    $ ./setup.py uninstall --extension weewxwd
    
  4. weewx-WD has now been removed from the system although the weewx-WD database will remain. To remove the weewx-WD database:

    if using SQLite:

    $ sudo rm $SQLITE_ROOT/weewxwd.sdb
    

    if using MySQL:

    $ mysql -u user -p
    mysql> DROP DATABASE weewxwd;
    mysql> quit;
    
  5. It is possible that depending on any customisation of the weewx-WD installation, weewx-WD skin remnants may remain as may remnants in weewx.conf. For these reasons, it may be advisable to confirm that weewx-WD has been fully removed from the system. To confirm that weewx-WD has been properly removed from the system:

    • Confirm the following folders have been deleted:

      • $SKIN_ROOT/Clientraw
      • $SKIN_ROOT/PWS
      • $SKIN_ROOT/StackedWindRose
      • $SKIN_ROOT/SteelGauges
      • $SKIN_ROOT/Testtags

      If the folders have not been removed they may be removed using (as required):

      $ sudo rm -R $SKIN_ROOT/Clientraw $ sudo rm -R $SKIN_ROOT/PWS $ sudo rm -R $SKIN_ROOT/StackedWindRose $ sudo rm -R $SKIN_ROOT/SteelGauges $ sudo rm -R $SKIN_ROOT/Testtags

    • Confirm that all weewx-WD content has been removed from weewx.conf. Edit weewx.conf:

      $ vi weewx.conf

      and confirm that the following have been removed:

      • [[wdTesttags]], [[wdPWS]], [[wdClientraw]], [[wdStackedWindRose]] and [[wdSteelGauges]] have been removed from [StdReport]

      • [[weewxwd_sqlite]] and [[weewxwd_mysql]] have been removed from [Databases]

      • [[wd_binding]] has been removed from [DataBindings]

      • [weewx-WD] has been removed

      • user.weewxwd3.WdWXCalculate has been removed from process_services in [Engine]

      • user.weewxwd3.WdArchive has been removed from archive_services in [Engine]

      If the above have not been removed then use the editor to manually remove them.

  6. weewx-WD has now been fully removed from the system and weewx may be started:

    $ sudo /etc/init.d/weewx start
    

    or

    $ sudo service weewx start
    

Uninstalling weewx-WD manually

To uninstall weewx-WD manually:

Note: If you are uninstalling weewx-WD v0.9.x then you must following the instructions at Uninstalling legacy weewx-WD.

  1. Stop weewx:

    $ sudo /etc/init.d/weewx stop
    

    or

    $ sudo service weewx stop
    
  2. Delete the weewx-WD files (wd*.py, weewxwd*.py and imageStackedWindRose*.py) from the $BIN_ROOT/user folder:

    $ sudo rm $BIN_ROOT/user/wd*.py
    $ sudo rm $BIN_ROOT/user/weewxwd*.py
    $ sudo rm $BIN_ROOT/user/imageStackedWindRose*.py
    
  3. Delete the weewx-WD skin folders (Clientraw, PWS, StackedWindRose, SteelGauges and Testtags) from the $SKIN_ROOT folder:

    $ sudo rm -R $SKIN_ROOT/Clientraw
    $ sudo rm -R $SKIN_ROOT/PWS
    $ sudo rm -R $SKIN_ROOT/StackedWindRose
    $ sudo rm -R $SKIN_ROOT/SteelGauges
    $ sudo rm -R $SKIN_ROOT/Testtags
    
  4. Remove all weewx-WD content from weewx.conf. Edit weewx.conf:

    $ vi weewx.conf
    
    • Locate [StdReport] and remove the following subsections [[wdTesttags]], [[wdPWS]], [[wdClientraw]], [[wdStackedWindRose]] and wdSteelGauges
    • Locate [Databases] and remove the subsections [[weewxwd_sqlite]] and [[weewxwd_mysql]]
    • Locate [DataBindings] and remove the subsection [[wd_binding]]
    • Locate [weewx-WD] and remove the entire section
    • Locate [Engine] and remove user.weewxwd3.WdWXCalculate from process_services
    • Locate [Engine] and remove user.weewxwd3.WdArchive from archive_services
  5. weewx-WD has now been removed from the system although the weewx-WD database will remain. To remove the weewx-WD database:

    if using SQLite:

    $ sudo rm $SQLITE_ROOT/weewxwd.sdb
    

    if using MySQL:

    $ mysql -u user -p
    mysql> DROP DATABASE weewxwd;
    mysql> quit;
    
  6. weewx-WD has now been fully removed from the system and weewx may be started:

    $ sudo /etc/init.d/weewx start
    

    or

    $ sudo service weewx start
    

Uninstalling legacy weewx-WD

To uninstall legacy weewx-WD:

  1. Stop weewx:

    $ sudo /etc/init.d/weewx stop
    

    or

    $ sudo service weewx stop
    
  2. Delete the weewx-WD python files:

    $ sudo rm $BIN_ROOT/user/wd*.py
    $ sudo rm $BIN_ROOT/user/weewxwd*.py
    $ sudo rm $BIN_ROOT/user/imageStackedWindRose*.py
    
  3. Delete the weewx-WD skin directories:

    $ sudo rm -R $SKIN_ROOT/Clientraw
    $ sudo rm -R $SKIN_ROOT/PWS
    $ sudo rm -R $SKIN_ROOT/StackedWindRose
    $ sudo rm -R $SKIN_ROOT/SteelGauges
    $ sudo rm -R $SKIN_ROOT/Testtags
    
  4. Remove all weewx-WD content from weewx.conf. Edit weewx.conf:

    $ vi weewx.conf
    
    • Locate [StdReport] and remove the following subsections [[wdTesttags]], [[wdPWS]], [[wdClientraw]], [[wdStackedWindRose]] and [[wdSteelGauges]]
    • Locate [Engine] and remove user.wd.WD from process_services
    • Locate [Engine] and remove user.wdarchive.WDArchive from archive_services
  5. weewx-WD has now been removed from the system although the weewx-WD data may remain in the weewx database. To remove the weewx-WD data from the weewx database:

    if using SQLite:

    • Make a copy of the weewx archive database:

      $ cp $SQLITE_ROOT/weewx.sdb $SQLITE_ROOT/weewx_backup.sdb
      
    • Open the weewx archive database using the sqlite3 application:

      $ sqlite3 $SQLITE_ROOT/weewx.sdb
      
    • Delete extraTemp1 or extraTemp2 data:

      sqlite> UPDATE archive SET extraTemp1=NULL WHERE extraTemp1 IS NOT NULL;
      sqlite> UPDATE archive SET extraTemp2=NULL WHERE extraTemp2 IS NOT NULL
      
    • Exit SQLite:

      sqlite> .quit
      

    if using MySQL:

    • Open the weewx archive database:

      $ mysql -u user -p weewx
      
    • Check to see if there are records to change:

      mysql> SELECT COUNT(extraTemp1) FROM archive WHERE extraTemp1 IS NOT NULL;
      mysql> SELECT COUNT(extraTemp2) FROM archive WHERE extraTemp2 IS NOT NULL;
      
    • If either of the two queries returns a non-zero answer there is data to delete. To delete extraTemp1 or extraTemp2 data:

      mysql> UPDATE archive SET extraTemp1=NULL WHERE extraTemp1 IS NOT NULL;
      mysql> UPDATE archive SET extraTemp2=NULL WHERE extraTemp2 IS NOT NULL;
      
    • Exit MySQL:

      mysql> quit;
      
  6. weewx-WD has now been fully removed from the system and weewx may be started:

    sudo /etc/init.d/weewx start
    

    or

    sudo service weewx start
    

Updated