diff --git a/salt/states/file.py b/salt/states/file.py index 4f035b7f4a2a..887fa2b0199d 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -2032,6 +2032,11 @@ def tidied( time_comparison = "atime" time_comparison = time_comparison.lower() + # Convert size with human units to bytes + if isinstance(size, str): + # add handle_metric=True when #61833 is merged + size = salt.utils.stringutils.human_to_bytes(size) + # Define some variables todelete = [] today = date.today()