     $scope.repoLabels = ()->
       _.uniq( $scope.repos.map((x) -> x.label) )
 
+    $scope.repoSelectedIds = ()->
+      _.keys( $scope.repoSelected )
+
     $scope.selectRepo = (m)->
       if m? and m.id?
-        if $scope.repoSelected? and $scope.repoSelected.id is m.id
-          console.log "deselect repos"
-          $scope.repoSelected = null
+        if $scope.repoSelected[m.id]?
+          console.log "repo deselect #{m.name} (#{m.id})"
+          delete $scope.repoSelected[m.id]
         else
-          console.log("repo #{m.name} (#{m.id}) selected")
-          $scope.repoSelected = m
+          console.log("repo select #{m.name} (#{m.id})")
+          $scope.repoSelected[m.id] = m
         # deselect repo selection by Label
         $scope.repoSelectedLabel = null
       else
-        console.log("repo deselected")
-        $scope.repoSelected = null
+        console.log("repo deselect all")
+        $scope.repoSelected = {}
         $scope.repoSelectedLabel = null
       # update the list of packages with the selected repo
       $scope.fetchPackages()

      $scope.allPackagesMap = {}

      # If a repo was selected, filter by it
      if $scope.repoSelected?
        query = { 'outdated':true, 'repo': $scope.repoSelected.id }
      else if $scope.repoSelectedLabel?
        query = { 'outdated':true, 'repolabel': $scope.repoSelectedLabel }
      else

        console.log("selecting repo label: #{label}")
        $scope.repoSelectedLabel = label
        # deselect repo selection by ID
        $scope.repoSelected = {}
      # update the list of packages with the selected repo
      console.log "-- fetch packages label: #{$scope.repoSelectedLabel}"
      console.log "-- fetch packages id   : #{$scope.repoSelected}"
