Index: tolbase/lib/toltk/tolpkg.tcl
===================================================================
--- tolbase/lib/toltk/tolpkg.tcl	(revision 0db54a1c27bad5c39a128256754305525838c0c4)
+++ tolbase/lib/toltk/tolpkg.tcl	(revision 455a6d5dc26df981292bb75f250bdac6781c28a6)
@@ -221,9 +221,11 @@
     Real TolPackage::Client::RemoteInstall( "%r", "%p", 1 )
   } ]
-  set result [ toltcl::eval $tolexpr ]
+  if { [ catch  { toltcl::eval $tolexpr } result ] } {
+    set result 0
+  }
   if { [ string is boolean $result ] && $result } {
     DeleteBackup $pkg
   } else {
-    RestoreBackup $pkg
+    RestoreBackup $pkg 1
   }
   return $result
Index: tolbase/lib/toltk/tolpkg_gui.tcl
===================================================================
--- tolbase/lib/toltk/tolpkg_gui.tcl	(revision 0db54a1c27bad5c39a128256754305525838c0c4)
+++ tolbase/lib/toltk/tolpkg_gui.tcl	(revision 455a6d5dc26df981292bb75f250bdac6781c28a6)
@@ -681,4 +681,5 @@
   set nodesInfo($treeParents($p),type) pkg
   set nodesInfo($treeParents($p),status) $nodeStatus
+  lappend nodesInfo($nodeStatus) $treeParents($p)
 }
 
@@ -762,4 +763,5 @@
     set nodesInfo($nid,type) pkgver
     set nodesInfo($nid,status) $nodeStatus
+    lappend nodesInfo($nodeStatus) $nid
     foreach {{} d} $pkg(_.autodoc.dependencies) {
       set _nid [ $T insert [ list [ list back_to_ou_16 $d ] ] \
@@ -788,4 +790,14 @@
       -postcommand [ list ::TolPkgGUI::PostContextMenu $t $t.cmenu ]
   $t configure -contextmenu $t.cmenu
+}
+
+proc ::TolPkgGUI::EntryState { listName } {
+  upvar $listName v
+
+  if { [ info exists v ] && [ llength $v ] } {
+    return "normal"
+  } else {
+    return "disabled"
+  }
 }
 
@@ -904,5 +916,6 @@
   }
   $w add command -label [ mc "Update all" ] \
-      -command "::TolPkgGUI::UpdatePackageVersion"
+      -command "::TolPkgGUI::UpdatePackageVersion" \
+      -state [ EntryState nodesInfo(update) ]
   # upgrade list
   if { [ llength $listUPG ] == 1 } {
@@ -915,5 +928,7 @@
   }
   $w add command -label [ mc "Upgrade all" ] \
-      -command "::TolPkgGUI::UpgradePackages"
+      -command "::TolPkgGUI::UpgradePackages" \
+      -state [ EntryState nodesInfo(upgrade) ]
+
   # export options
   $w add separator
@@ -1300,4 +1315,6 @@
 proc ::TolPkgGUI::UpgradePackages { { pkgs {} } } {
   variable installData
+  variable nodesInfo
+  variable tree
 
   if { ![ CheckConnectionConfig ] } {
@@ -1312,6 +1329,13 @@
   } else {
     # upgrade all, look for the list
-    Unimplemented "Upgrade all packages"
-    return
+    if { [ info exists nodesInfo(upgrade) ] } {
+      foreach nid $nodesInfo(upgrade) {
+        set p [ $tree item text $nid 0 ]
+        lappend upgradeList $p
+        set installData($p) $nid
+      }
+    } else {
+      return
+    }
   }
   DlgProcess $upgradeList -title [ mc "Upgrade packages" ] \
@@ -1323,4 +1347,6 @@
 proc ::TolPkgGUI::UpdatePackageVersion { { pkgs {} } } {
   variable installData
+  variable nodesInfo
+  variable tree
 
   puts "UpdatePackageVersion: $pkgs"
@@ -1330,4 +1356,5 @@
   
   array unset installData
+  set updateList {}
   if { [ llength $pkgs ] } {
     foreach p $pkgs {
@@ -1336,7 +1363,14 @@
     }
   } else {
-    # upgrade all, look for the list
-    Unimplemented "Update all packages"
-    return
+    # update all, look for the list
+    if { [ info exists nodesInfo(update) ] } {
+      foreach nid $nodesInfo(update) {
+        set p [ $tree item text $nid 0 ]
+        lappend updateList $p
+        set installData($p) $nid
+      }
+    } else {
+      return
+    }
   }
   DlgProcess $updateList -title [ mc "Update packages" ] \
