The Linux Community Forum

Support => General Help & Advice => Topic started by: MattC on January 01, 2021, 03:06:05 pm

Title: Zerofree Utility
Post by: MattC on January 01, 2021, 03:06:05 pm
Hi,

I'm trying to reduce the size of the VDI disk images in VirtualBox and the help recommends Zerofree to zero out all deleted files.  Is there any where that I can download this file securely, and does it support ext4?

Matt
Title: Re: Zerofree Utility
Post by: Keith on January 01, 2021, 03:49:51 pm
Hi Matt.

This says it's OK for ext4: https://community.linuxmint.com/software/view/zerofree (https://community.linuxmint.com/software/view/zerofree) and you can download it there.
This download site list versions for many Linux distros but not for Mint; https://pkgs.org/download/zerofree (https://pkgs.org/download/zerofree). 

Keith
Title: Re: Zerofree Utility
Post by: MattC on January 01, 2021, 04:08:02 pm
Not sure whether I'm doing something wrong, but I click on the pkgs link and then on the appropriate APK link.  This takes me to the alpine page.  I click on the link beside the repository.  Page 4 apparently links to the file, but it takes me back to the alpine site.  ???  What am I missing?
Title: Re: Zerofree Utility
Post by: Keith on January 01, 2021, 04:16:55 pm
You've lost me, Matt.  I don't know which pkgs, APK and alpine links you are referring to.  But circular references are not uncommon, I find, so you may need to find another source - although I didn't. 

I don't have Mint so don't want to screw up my installation by trying it - perhaps you would be best asking on the Mint forum: https://forums.linuxmint.com/ (https://forums.linuxmint.com/)

Sorry I can't be of  more help.
Keith
Title: Re: Zerofree Utility
Post by: MattC on January 01, 2021, 06:52:52 pm
Your first post stated a download site pkgs.org.  Clicking on that link takes me to that site, but I cannot get the download as the appropriate links take me in loops without getting to a download.  Not to worry.  If anyone has a better idea please let me know.

Matt
Title: Re: Zerofree Utility
Post by: Keith on January 01, 2021, 06:59:07 pm
Sorry, I didn't notice you were referring to the URL. I was just pointing out that that that URL had downloads for lots of Linux distros except Mint - so no surprise you didn't get anywhere.  And still not sure about your refs to APK and Alpine.  The Mint download site looked like the only option.  No matter. 
Title: Re: Zerofree Utility
Post by: MattC on January 01, 2021, 07:13:14 pm
Sorry.  Too much to explain, but I was being thick.  I've figured it out - I think.
Title: Re: Zerofree Utility
Post by: Keith on January 01, 2021, 07:14:37 pm
Excellent news - do report later.
Title: Re: Zerofree Utility
Post by: wishbone on January 01, 2021, 07:44:09 pm
Hi Keith,
Excuse me for butting in, isn`t Mint still based on Ubuntu or have they sidled away from them? Zerofree is available for Ubuntu and if Mint is still based on Buntu wouldn`t it then still be applicable? Just my ramblings.
Title: Re: Zerofree Utility
Post by: Keith on January 01, 2021, 07:52:10 pm
Hi Wishbone.  Many thanks for your input.
Yes; you are right but I deliberately didn't suggest it as I wasn't sure it would automatically be appropriate.  Just over cautious I guess. 
Specifically, there wasn't an Ubuntu 19 listed to match Matt's Mint 19, and the versions usually match, I think.  Which one would you suggest - 18 or 20?

@Matt: I see now where you got the "Alpine" from.  Definitely not recommended!

Keith
Title: Re: Zerofree Utility
Post by: wishbone on January 01, 2021, 08:06:01 pm
Hi Wishbone.  Many thanks for your input.
Yes; you are right but I deliberately didn't suggest it as I wasn't sure it would automatically be appropriate.  Just over cautious I guess. 
Specifically, there wasn't an Ubuntu 19 listed to match Matt's Mint 19, and the versions usually match, I think.  Which one would you suggest - 18 or 20?

@Matt: I see now where you got the "Alpine" from.  Definitely not recommended!

Keith

Good question Keith, I use Peppermint 10 which is based on Mint 19 (I think) and Ubuntu Bionic. What I would do if I was going to download it would be to back up my system first, then try either 18 or 20 and see which one works. Who knows, they might both be suitable. I would strongly remind someone to back up when doing something that might not go to plan. Back up regularly anyway!!!!

That`s my twopenneth worth.

Tony
Title: Re: Zerofree Utility
Post by: Keith on January 01, 2021, 08:09:03 pm
Good idea, Tony.  How about it, Matt?

Mind you, I'm still not sure of the value of Zerofree.

Keith
Title: Re: Zerofree Utility
Post by: MattC on January 01, 2021, 08:30:40 pm
Hi Keith,

Zerofree sets all the bytes in the unused or deleted files to zeros.  This is the only way that VirtualBox can 'compress' the VDI virtual HDD.  It's not really for use on a real machine, just on a virtual one.

However, I did try it on the Linux Lite 1 that I have.  Daownloaded it through the repository.  Everything seemed to work, but the VDI remained the same size.  So it probably didn't work.

Matt
Title: Re: Zerofree Utility
Post by: Keith on January 01, 2021, 10:08:03 pm
Perhaps there was nothing to compress?  And I read somewhere that zerofree is for image files rather than installed OSs - or have I misunderstood?

Keith
Title: Re: Zerofree Utility
Post by: MattC on January 02, 2021, 08:00:26 am
You could be right, but the difference between the VDI file and the usage in the VM was around a gig, which I was expecting to align.

VirtualBox manual suggests (but is not specific) that Zerofree will reduce any unused and/or deleted files (those ones removed from the file catalogue) to zeros, whatever the initial use of the file.  VB will then remove these allocation units from the compressed file.  This is also a security app for removing the possibility of recovery in a normal system.
Title: Re: Zerofree Utility
Post by: Keith on January 02, 2021, 09:16:48 am
For readers as easily confused as I am, the following links may help to understand the various mystical initials used here:
VDI: "Virtual Desktop Infrastructure" - https://www.javatpoint.com/what-is-vdi (https://www.javatpoint.com/what-is-vdi)
VM: "Virtual Machine" - https://www.fosslinux.com/43294/what-is-a-virtual-machine-and-why-to-use-it.htm (https://www.fosslinux.com/43294/what-is-a-virtual-machine-and-why-to-use-it.htm)
VB: "VirtualBox" - https://www.oracle.com/uk/virtualization/virtualbox/ (https://www.oracle.com/uk/virtualization/virtualbox/)
Title: Re: Zerofree Utility
Post by: MattC on January 02, 2021, 10:17:04 am
Thanks Keith.  I spend some time discussing things with others who talk almost exclusively in abbreviations.

Old joke: "I hate people who use TLAs!" (three letter abbreviations)  ;D

I'll have to get out of the habit, or explain definitively what I'm discussing.

Thanks.
SimplePortal 2.3.3 © 2008-2010, SimplePortal