{"versions":{"4.0.0":{"name":"@sindresorhus/df","version":"4.0.0","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"dependencies":{"execa":"^5.1.1"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.45.0"},"gitHead":"3f471488e860071f0d59b62d6c5ef595abee6d54","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_id":"@sindresorhus/df@4.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.20.3","dist":{"shasum":"f780395d197827f0976e92db3ca0d838200f8178","size":3288,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-4.0.0.tgz","integrity":"sha512-s8SqHvZ9HgSPD2Jvd1d/Y0KtZ1AeakUN1phbu5G3vt5Ob4KUPp8HSZdOvKcIcpgIiI6tjbJPoKkzKLw6VsfgxQ=="},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/df_4.0.0_1634206003142_0.7966966530878961"},"_hasShrinkwrap":false,"publish_time":1634206003272,"_cnpm_publish_time":1634206003272,"_cnpmcore_publish_time":"2021-12-16T13:37:45.791Z","contributors":[]},"3.1.1":{"name":"@sindresorhus/df","version":"3.1.1","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"dependencies":{"execa":"^2.0.1"},"devDependencies":{"ava":"^2.1.0","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"d6b69f2c40b8bdf9760ef33ab3bca2b204af0aff","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_id":"@sindresorhus/df@3.1.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"94200f9277e4a7fdd35ce8ab8b6bc5b52b164d31","size":3075,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-3.1.1.tgz","integrity":"sha512-SME/vtXaJcnQ/HpeV6P82Egy+jThn11IKfwW8+/XVoRD0rmPHVTeKMtww1oWdVnMykzVPjmrDN9S8NBndPEHCQ=="},"maintainers":[{"email":"sindresorhus@gmail.com","name":"anonymous"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/df_3.1.1_1561884444426_0.9361179855197934"},"_hasShrinkwrap":false,"publish_time":1561884444646,"_cnpm_publish_time":1561884444646,"_cnpmcore_publish_time":"2021-12-16T13:37:46.170Z","contributors":[]},"3.1.0":{"name":"@sindresorhus/df","version":"3.1.0","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"dependencies":{"execa":"^1.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"5f8ca4ac1b34c5c8d72a03bbad81c97f772e951f","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_id":"@sindresorhus/df@3.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"968f6df0b1ff873a1ee6b11484d8bdf6cf0259eb","size":2753,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-3.1.0.tgz","integrity":"sha512-lWC2M3nT61HaRsO+DH2E/UFpLHhtyjO0kQA7pVyxTPctw+O6eCMfqXB9c05Fd2kvb3pGZs5gnlCSuskbuciLFQ=="},"maintainers":[{"email":"sindresorhus@gmail.com","name":"anonymous"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/df_3.1.0_1554028717364_0.6005752998230178"},"_hasShrinkwrap":false,"publish_time":1554028717500,"_cnpm_publish_time":1554028717500,"_cnpmcore_publish_time":"2021-12-16T13:37:46.376Z","contributors":[]},"3.0.0":{"name":"@sindresorhus/df","version":"3.0.0","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"dependencies":{"execa":"^1.0.0"},"devDependencies":{"ava":"^1.3.1","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"277855ff337833d1a732373d5c150d8249e36e9b","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_id":"@sindresorhus/df@3.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e6a9c88b39c9111240de9e1d94e9f48abf230c05","size":2704,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-3.0.0.tgz","integrity":"sha512-AWDUDmRm4Q8F0l0vrKxp6U1Gb4rkUVRLk1xX6xnc6M0xwgY0JFLDXw1dmF3j2ImP4vQfCGt3JwwgfrzOjXNCZA=="},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"},{"name":"anonymous","email":"sindresorhus+unicorn@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/df_3.0.0_1552290080778_0.9277966857622033"},"_hasShrinkwrap":false,"publish_time":1552290081100,"_cnpm_publish_time":1552290081100,"_cnpmcore_publish_time":"2021-12-16T13:37:46.600Z","contributors":[]},"2.1.0":{"name":"@sindresorhus/df","version":"2.1.0","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"publishConfig":{"access":"public"},"files":["index.js"],"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"dependencies":{"execa":"^0.2.2"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"ea9be6d4f60fb7b8e0b38bb626c6454ce2974a14","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_id":"@sindresorhus/df@2.1.0","_shasum":"d208cf27e06f0bb476d14d7deccd7d726e9aa389","_from":".","_npmVersion":"2.15.0","_nodeVersion":"4.4.2","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d208cf27e06f0bb476d14d7deccd7d726e9aa389","size":2436,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-2.1.0.tgz","integrity":"sha512-yozEsK3X8sEjh9fiolh3JntMUuGKe2n2t8gtE3yZ1PqAFFeaSxTrSiEVORy/YkPzUsxQ85RzLcGqmqSOgiFhtg=="},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"},{"name":"anonymous","email":"sindresorhus+unicorn@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/df-2.1.0.tgz_1466109899111_0.3926803059875965"},"directories":{},"publish_time":1466109900115,"_hasShrinkwrap":false,"_cnpm_publish_time":1466109900115,"_cnpmcore_publish_time":"2021-12-16T13:37:46.831Z","contributors":[]},"2.0.0":{"name":"@sindresorhus/df","version":"2.0.0","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"publishConfig":{"access":"public"},"files":["index.js"],"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"dependencies":{"execa":"^0.2.2"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"95184d46d4d2113958ebc9a31c7ce5b5391e5291","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_id":"@sindresorhus/df@2.0.0","_shasum":"4dca43ac7eba06618de8d0afa4d76224d0bdd313","_from":".","_npmVersion":"2.15.0","_nodeVersion":"4.4.2","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"4dca43ac7eba06618de8d0afa4d76224d0bdd313","size":2334,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-2.0.0.tgz","integrity":"sha512-JxeWWicWgX8QfKrJa4C7CxsjCJn1oOKIBbpI/nbehzEPIne4GD+bbBRkSSZ1BH+yYaJcDdRuv+DtM+TVsA6TIA=="},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"},{"name":"anonymous","email":"sindresorhus+unicorn@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/df-2.0.0.tgz_1460408859216_0.09315302595496178"},"directories":{},"publish_time":1460408861966,"_hasShrinkwrap":false,"_cnpm_publish_time":1460408861966,"_cnpmcore_publish_time":"2021-12-16T13:37:47.086Z","contributors":[]},"1.0.1":{"name":"@sindresorhus/df","version":"1.0.1","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"devDependencies":{"ava":"0.0.4"},"gitHead":"d08cdc4d48a7cc0a36f01e741118e48549d407ae","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_id":"@sindresorhus/df@1.0.1","_shasum":"c69b66f52f6fcdd287c807df210305dbaf78500d","_from":".","_npmVersion":"2.9.0","_nodeVersion":"0.10.38","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c69b66f52f6fcdd287c807df210305dbaf78500d","size":2396,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-1.0.1.tgz","integrity":"sha512-1Hyp7NQnD/u4DSxR2DGW78TF9k7R0wZ8ev0BpMAIzA6yTQSHqNb5wTuvtcPYf4FWbVse2rW7RgDsyL8ua2vXHw=="},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"directories":{},"publish_time":1430769138160,"_hasShrinkwrap":false,"_cnpm_publish_time":1430769138160,"_cnpmcore_publish_time":"2021-12-16T13:37:47.287Z","contributors":[]},"5.0.0":{"name":"@sindresorhus/df","version":"5.0.0","description":"Get free disk space info from `df -kP`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/df.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava"},"keywords":["df","dfkp","df-kp","disk","space","free","info","data","fs","filesystem","file-system","drive","mount","size","capacity"],"dependencies":{"execa":"^9.6.0"},"devDependencies":{"ava":"^6.4.1","xo":"^1.2.2"},"_id":"@sindresorhus/df@5.0.0","gitHead":"376fb6156e1c09eb8e2eb78e8e5a0ae356bea0b5","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/df/issues"},"homepage":"https://github.com/sindresorhus/df#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-pr7nIDyyNDuZou1MoEReqYYemOFx5NomXsC7+YDQoLZia7YJKfRXEiiZYCKiVeaMkzefNz+3c5U2UbbgOWGeYw==","shasum":"dff165162c9e64a324e143034911f04e09834676","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@sindresorhus/df/-/df-5.0.0.tgz","fileCount":5,"unpackedSize":9715,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD694j2/VyPbuUt+qJaosLDDVeOR/ZIzfyaYE6pMvPMVAIhAIOfP/2b63DPok50QuxKnq5ftKBDvmxL3dgdTDkIAA6V"}],"size":3634},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/df_5.0.0_1757797786291_0.042930124213672594"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-13T21:09:46.479Z","publish_time":1757797786479,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"5.0.0"},"name":"@sindresorhus/df","time":{"created":"2022-01-26T14:00:50.999Z","modified":"2025-09-13T21:10:32.924Z","4.0.0":"2021-10-14T10:06:43.272Z","3.1.1":"2019-06-30T08:47:24.646Z","3.1.0":"2019-03-31T10:38:37.500Z","3.0.0":"2019-03-11T07:41:21.100Z","2.1.0":"2016-06-16T20:45:00.115Z","2.0.0":"2016-04-11T21:07:41.966Z","1.0.1":"2015-05-04T19:52:18.160Z","1.0.0":"2015-05-04T18:10:02.416Z","5.0.0":"2025-09-13T21:09:46.479Z"},"readme":"# df\n\n> Get free disk space info from [`df -kP`](https://en.wikipedia.org/wiki/Df_\\(Unix\\))\n\nWorks on any Unix-based system like macOS and Linux.\n\n*Created because all the other `df` wrappers are terrible. This one uses simple and explicit parsing. Uses `execFile` rather than `exec`. Ensures better platform portability by using the `-P` flag. Returns sizes in bytes instead of kilobytes and the capacity as a float.*\n\n## Install\n\n```sh\nnpm install @sindresorhus/df\n```\n\n## Usage\n\n```js\nimport {\n\tdiskSpace,\n\tdiskSpaceForFilesystem,\n\tdiskSpaceForFilesystemOwningPath\n} from '@sindresorhus/df';\n\nconsole.log(await diskSpace());\n/*\n[\n\t{\n\t\tfilesystem: '/dev/disk1',\n\t\ttype: 'ext4',\n\t\tsize: 499046809600,\n\t\tused: 443222245376,\n\t\tavailable: 55562420224,\n\t\tcapacity: 0.89,\n\t\tmountpoint: '/'\n\t},\n\t…\n]\n*/\n\nconsole.log(await diskSpaceForFilesystem('/dev/disk1'));\n/*\n{\n\tfilesystem: '/dev/disk1',\n\t…\n}\n*/\n\nconsole.log(await diskSpaceForFilesystemOwningPath('.'));\n/*\n{\n\tfilesystem: '/dev/disk1',\n\t…\n}\n*/\n```\n\n## API\n\n### diskSpace()\n\nReturns a `Promise<object[]>` with a list of space info objects for each filesystem.\n\n### diskSpaceForFilesystem(path)\n\nReturns a `Promise<object>` with the space info for the given filesystem path.\n\n- `filesystem` - Name of the filesystem.\n- `type` - Type of the filesystem.\n- `size` - Total size in bytes.\n- `used` - Used size in bytes.\n- `available` - Available size in bytes.\n- `capacity` - Capacity as a float from `0` to `1`.\n- `mountpoint` - Disk mount location.\n\n#### path\n\nType: `string`\n\nA path to a [filesystem device file](https://en.wikipedia.org/wiki/Device_file). Example: `'/dev/disk1'`.\n\n### diskSpaceForFilesystemOwningPath(path)\n\nReturns a `Promise<object>` with the space info for the filesystem the given path is part of.\n\n#### path\n\nType: `string`\n\nA path to a file/directory on the filesystem to get the space info for.","users":{}}