https://github.com/fphammerle/free-disk
Delete old files until a minimum of --free-bytes are available 💾
https://github.com/fphammerle/free-disk
cleanup disk-space filesystem modification-timestamps
Last synced: about 1 year ago
JSON representation
Delete old files until a minimum of --free-bytes are available 💾
- Host: GitHub
- URL: https://github.com/fphammerle/free-disk
- Owner: fphammerle
- License: mit
- Created: 2019-04-27T07:00:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-19T05:18:26.000Z (about 1 year ago)
- Last Synced: 2025-05-01T06:03:18.850Z (about 1 year ago)
- Topics: cleanup, disk-space, filesystem, modification-timestamps
- Language: Python
- Homepage: https://pypi.org/project/free-disk/#history
- Size: 622 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```