1

Hardware & OS used:

  • Mac Studio M1 Max 32GB mem 1TB SSD Mac OS Ventura 13.2
  • Mac Mini M1 16GB mem, 1TB SSD Mac OS Ventura 13.2
  • Mac Mini Intel i7 32GB mem, 1TB SSD, Mac OS Ventura 13.2

Background:
Currently using Veracrypt software container to store sensitive files. Update files within this secured container (after mounting) with Free File Sync works perfectly.

Objective:
Would like to change this way of operating to Apple’s own software ecosystem by using an encrypted .DMG, created with disk utility.

Followed procedure: In Disk Utility, select File > New Image > Blank Image, then save with name File.dmg and select location. Select name, select Size: 1GB, Format: APFS, select Encryption (enter password), Partitions: GUID Partition map, Image Format: read/write disk image, then click Save

File.dmg was created with a password. Works perfectly, mount and dismount.

The problem/issue on all three Macs:

If I now manually add files to this mounted disk image, all works fine. However, when I want to delete some files, the obsolete files disappear in the Finder view (also when displaying hidden files) but they keep occupying space in file.dmg. You can perfectly see this with the “Get Info” tab in Finder.

So my allocated 1GB gets very rapidly full as deleted files don’t hand back available file space to the system. I have tried all sorts of combinations (parameters) while creating a .dmg in Disk Utility, but the problem remains.

The only way in which I am able to reclaim the “lost” file space is to manually empty the Trash. I think this is not right as deleting files on an HDD or SSD should relinquish the space the moment the files are deleted and are being placed in the Trash, this pending final deletion.

Is anyone else experiencing this problem or am I doing something wrong?

1 Answer 1

0

Deleted data goes to the Trash. Files in Trash are still considered as part of the total disk usage until the Trash is emptied.

Trash does not recycle itself like Windows, though it has a 30-day timer [optional] to selectively fully delete files older than 30 days, similar to how many things on iOS work. If you start with an empty Trash bin, then you can see this in operation more easily. you can see items appear & disappear as you mount/unmount the dmg.

If you want to permanently delete items without emptying the entire Trash, delete them using
Cmd ⌘ Opt ⌥ Delete ⌦
You can also selectively delete items from Trash permanently by the same method, or from the right click menu.

9
  • @Tesujin, thanks you for your reply, really appreciated. So If I understand you correctly you cannot use a .dmg as a dynamically repository to add and delete without a human intervention i.e. delete trash manually in order to free up space? I dont know if you are familiar with Veracrypt on Mac - secured container where you and delete without this problem That is also a "virtual" drive like .dmg. I am a bit puzzled. Is there no way to circumvent this prob without the manual trash intervention? thanks.
    – fganon
    Jan 27, 2023 at 15:49
  • @fganon Delete files immediately, without sending them to Trash. That's the only way. Jan 27, 2023 at 15:59
  • As Marc says. I don't know why VeraCrypt would do it that way, it's more a Windows standard than Mac. macOS only does this normally on a foreign file system, one that can't handle .Trashes properly.
    – Tetsujin
    Jan 27, 2023 at 16:03
  • @Tetsujin & Marc. I added a comment last night but something when wrong as it is not visible on the thread - anyway, herewith. I did some tests and I think I see what you mean. Is the following statement than correct? When deleting files in Mac OS, on no mater what storage (internal& external), all those deleted files are displayed in the bin (trash), but the file space from where they originated from will only be freed up when you empty the trash.
    – fganon
    Jan 28, 2023 at 11:05
  • 1
    @Tetsijun, okay clear - think I learned something here - also I figured out ( following your comment above) why Veracrypt does not have these issues. In order to work with Veracrypt one has to install MacFuse which is a file system driver/utility in order to handle Veracrypt's "Alien" file system. Apparently a file delete in that environment is instantly. So you were absolutely right with your Windows recycle example. Thanks again to both you and Marc for taking the time to help me.
    – fganon
    Jan 28, 2023 at 11:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .