     .command 'clean'
     .description 'clean cache'
     .action ->
+        {writeCacheSync} = require './data'
         writeCacheSync {}
         process.exit 0
 cmder

    .description 'dump cache'
    .action ->
        require 'colors'
        console.log "npm-up cache: ".cyan + cachePath.yellow
        console.log cache.verCache or ''
        process.exit 0
cmder
    .option '-g, --global', "Check global packages"


    depNames = ['dep', 'dev', 'bundled', 'optional']
    res = depNames.reduce (res, cur) ->
        res = res or cmder[cur]
        res
    , false

    if res then depNames.forEach (name) -> opts[name] = not not cmder[name]
    else depNames.forEach (name) -> opts[name] = not cmder[name]

    opts

