<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2006-08-28</periodOfReport>

    <issuer>
        <issuerCik>0001100813</issuerCik>
        <issuerName>OPSWARE INC</issuerName>
        <issuerTradingSymbol>OPSW</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001290049</rptOwnerCik>
            <rptOwnerName>CRANNEY MARK D</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O OPSWARE INC.</rptOwnerStreet1>
            <rptOwnerStreet2>599 N MATHILDA AVENUE</rptOwnerStreet2>
            <rptOwnerCity>SUNNYVALE</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>94085</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>EVP-Worldwide Field Operations</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2006-08-28</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>F</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>4468</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>6.69</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>174467</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">As previously disclosed on a Form 4 filed on December 22, 2005, Mr. Cranney was granted a restricted stock award of 200,000 shares of Issuer's common stock.  6.25% of the shares subject to such award vest following the end of each fiscal quarter of Issuer.  Represents shares surrendered directly to Issuer to satisfy Mr. Cranney's minimum statutory tax withholding obligation that arises upon the vesting of such stock.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/ Jordan J. Breslow, Attorney-in-fact</signatureName>
        <signatureDate>2006-08-29</signatureDate>
    </ownerSignature>
</ownershipDocument>
