How do I force dub to install a newer version of a package?

I keep trying to use dub run with a newer version, but it doesn't work, it just rebuilds the old version.

$ dub run [email protected]
Fetching dpp 0.3.4...
Building package dpp in /Users/james/.dub/packages/dpp-0.3.1/dpp/
Performing "debug" build using /Library/D/dmd/bin/dmd for x86_64.
libclang 0.1.8: building configuration "library"...
sumtype 0.7.1: building configuration "library"...
dpp 0.3.1: building configuration "executable"...
ld: warning: directory not found for option '-L/usr/lib/llvm-6.0/lib'
ld: warning: directory not found for option '-L/usr/lib/llvm-3.9/lib'
Running ../../../../.dub/packages/dpp-0.3.1/dpp/bin/d++ 
Error: No .dpp input file specified
Usage: d++ [options] [D compiler options] <filename.dpp> [D compiler args]
Program exited with code 1

dub cache-clean doesn't fix the problem either.


  • Delete the package with rm -rf:

    rm -rf ../../../../.dub/packages/dpp-0.3.1/

    Then re-run:

    $ dub run [email protected] --force