# free-disk 💾
[](https://github.com/psf/black)
[](https://github.com/fphammerle/free-disk/actions)
[](https://pypi.org/project/free-disk/#history)
[](https://pypi.org/project/free-disk/)
Delete file with the oldest modification date
until a minimum of `--free-bytes` are available on the respective disk.
## Install
```sh
pip3 install --user --upgrade free-disk
```
## Usage
```sh
free-disk --help
free-disk --free-bytes 1GiB /dir/to/cleanup
free-disk --free-bytes 1GiB --delete-path-regex '\.mp4$' /dir/to/cleanup
free-disk --debug --free-bytes 2GB /dir/to/cleanup
```
## Tests
```sh
pip3 install --user pipenv
git clone https://github.com/fphammerle/free-disk.git
cd freesurfer-volume-reader
pipenv run pylint free_disk
pipenv run pytest
```
Raw data
{
"_id": null,
"home_page": "https://github.com/fphammerle/free-disk",
"name": "free-disk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "disk,files,cleanup,free,delete,old",
"author": "Fabian Peter Hammerle",
"author_email": "fabian@hammerle.me",
"download_url": "https://files.pythonhosted.org/packages/85/ac/5bfb86bb7876b408d1028a39f5d345f867f4520e24ee07fc5d108873502c/free-disk-1.0.0.tar.gz",
"platform": null,
"description": "# free-disk \ud83d\udcbe\n\n[](https://github.com/psf/black)\n[](https://github.com/fphammerle/free-disk/actions)\n[](https://pypi.org/project/free-disk/#history)\n[](https://pypi.org/project/free-disk/)\n\nDelete file with the oldest modification date\nuntil a minimum of `--free-bytes` are available on the respective disk.\n\n## Install\n\n```sh\npip3 install --user --upgrade free-disk\n```\n\n## Usage\n\n```sh\nfree-disk --help\nfree-disk --free-bytes 1GiB /dir/to/cleanup\nfree-disk --free-bytes 1GiB --delete-path-regex '\\.mp4$' /dir/to/cleanup\nfree-disk --debug --free-bytes 2GB /dir/to/cleanup\n```\n\n## Tests\n\n```sh\npip3 install --user pipenv\ngit clone https://github.com/fphammerle/free-disk.git\ncd freesurfer-volume-reader\npipenv run pylint free_disk\npipenv run pytest\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "delete file with oldest modification date until a minimum of --free-bytes are available on disk",
"version": "1.0.0",
"split_keywords": [
"disk",
"files",
"cleanup",
"free",
"delete",
"old"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "abe77e53ea13a245d3de1bdc15bd4a16",
"sha256": "cd6591376bfce3cc5d1977daed65424ecba3258a888806565022a976915ca68c"
},
"downloads": -1,
"filename": "free_disk-1.0.0-py3-none-any.whl",
"has_sig": true,
"md5_digest": "abe77e53ea13a245d3de1bdc15bd4a16",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 4359,
"upload_time": "2022-05-12T19:15:04",
"upload_time_iso_8601": "2022-05-12T19:15:04.759533Z",
"url": "https://files.pythonhosted.org/packages/21/f8/dd5d81678b55bee9ec5f76005c9c054c596c8a1ec83cbc30f92472b994ca/free_disk-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "c1346a74a780bca73e731da6a2410ec7",
"sha256": "fbef53059eebb14feb1ffd6d887df3783eef08e852d59f09416b792fb4f91971"
},
"downloads": -1,
"filename": "free-disk-1.0.0.tar.gz",
"has_sig": true,
"md5_digest": "c1346a74a780bca73e731da6a2410ec7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 20883,
"upload_time": "2022-05-12T19:15:07",
"upload_time_iso_8601": "2022-05-12T19:15:07.416867Z",
"url": "https://files.pythonhosted.org/packages/85/ac/5bfb86bb7876b408d1028a39f5d345f867f4520e24ee07fc5d108873502c/free-disk-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-05-12 19:15:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "fphammerle",
"github_project": "free-disk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "free-disk"
}