The CanonicalGroupLimited folder is a temporary installation artifact created by the Ubuntu Appx package when running WSL2, not a VirtualBox virtual disk file. You can safely delete this directory from your host machine without affecting any existing VirtualBox VDI or VHDX files because they are stored in completely separate locations and managed by different software stacks.
Understanding the Source of the Folder
When you install Ubuntu from the Microsoft Store on Windows 10 or 11, it sets up a Linux Subsystem environment rather than a traditional hypervisor virtual machine. The
CanonicalGroupLimited directory typically appears in your user profile path, often under
C:\Users\\AppData\Local\Packages. This location houses the packaged application data for the Windows Store version of Ubuntu. It contains configuration files, cached downloads, and initial setup scripts that allow the Linux distribution to boot within the Windows kernel integration layer known as WSL2.
This structure is fundamentally different from how VirtualBox manages its virtual machines. VirtualBox stores its virtual hard drives in dedicated folders you specify during creation, usually ending in
.vdi (VirtualBox Disk Image) or
.vhdx (Hyper-V Format). These files represent the entire storage volume of the guest operating system. Deleting the CanonicalGroupLimited folder does not touch these disk images because they reside elsewhere on your drive, often in
C:\Users\\VirtualBox VMs or another custom path you defined.
VDI vs VHDX File Formats
It is important to distinguish between the file formats used by different virtualization platforms to avoid accidental data loss. A
.vdi file is native to Oracle VirtualBox and supports features like snapshots and differential backups specific to that platform. A
.vhdx file is the modern standard for Microsoft Hyper-V and newer versions of VirtualBox, offering better resilience against corruption and support for larger disk sizes exceeding 2TB. Neither of these file types is located inside the CanonicalGroupLimited package directory. They are standalone binary files that VirtualBox reads directly to emulate the hardware of your guest OS.
For users who need to manage network traffic between multiple virtual machines, understanding the isolation of these components is crucial. If you are setting up complex networking scenarios, such as routing traffic between VMs through the host, refer to our guide on
How to Configure a Traffic Route from VM1 through Host to VM2. This ensures that your virtual networks remain stable regardless of host-side package installations.
Safely Removing the Ubuntu Package Data
If you no longer use the Microsoft Store version of Ubuntu or wish to reclaim disk space, you can remove the CanonicalGroupLimited folder using standard Windows procedures. The most reliable method is to uninstall the application through the system settings, which triggers the cleanup process for associated packages.
Navigate to
Settings > Apps > Installed Apps (or
Apps & Features on older Windows versions). Search for "Ubuntu" in the list. Click on the entry and select
Uninstall. Follow the on-screen prompts to complete the removal. Windows will automatically delete the corresponding package folder, including
CanonicalGroupLimited, from the
AppData\Local\Packages directory.
If the uninstaller fails or leaves residual files, you can manually delete the folder. Close all instances of WSL and Ubuntu terminals. Open File Explorer and navigate to
C:\Users\\AppData\Local\Packages. Locate the subfolder starting with
CanonicalGroupLimited and ending with something like
79rhkp1fndgsc. Right-click and select
Delete. If you encounter permission errors, ensure you have administrative rights or that no background processes are locking the files.
Managing VirtualBox Storage Independently
Deleting the WSL package does not impact your VirtualBox environment. However, if you are looking to optimize your VirtualBox disks, you might consider converting static disks to dynamic ones to save space. For detailed instructions on configuring Linux guests with dynamic space allocation, see our article on
How to Configure Linux Guest with Dynamic Space in VirtualBox. This helps maintain efficient storage usage without interfering with host-side Linux subsystems.
To manually clean up VirtualBox disk images, open the VirtualBox Manager. Select the VM you wish to modify and go to
Settings > Storage. Here you can detach old or unused
.vdi or
.vhdx files. Remember to also delete the actual files from your hard drive after detaching them in the manager to free up physical storage. Always verify that the VM is powered off before modifying storage controllers.
Common Issues with Vagrant and Ubuntu
Sometimes users confuse VirtualBox management with Vagrant workflows. If you are using Vagrant to provision Ubuntu boxes, you might encounter permission issues or command errors. For instance, if your
vagrant up command fails, check your provider settings. If you face permission denied errors in an Ubuntu Jammy64 box, ensure your shared folders are correctly mounted. Relevant troubleshooting steps can be found in our guides on
Fixing Permission Denied Error in Vagrant with Ubuntu Jammy64 and
What to do when the 'vagrant up' command outputs an error. These resources address common pitfalls in automated provisioning that are distinct from manual VirtualBox or WSL management.
Frequently Asked Questions
Will deleting CanonicalGroupLimited affect my WSL2 distros?
Yes, if you installed Ubuntu via the Microsoft Store, deleting this folder removes that specific instance of Ubuntu. Your other WSL2 distributions, such as Debian or Kali, installed separately will remain unaffected. You should always use the official uninstaller first to ensure proper cleanup of registry keys and services.
Can I recover deleted VDI files if I accidentally remove them?
No, VirtualBox does not keep backup copies of detached disk images. Once you delete the
.vdi file from your host filesystem and remove it from the VirtualBox manager, the data is gone unless you have external backups. Always export or clone your VMs before deleting source disk files to prevent permanent data loss.
Why does my VirtualBox show both VDI and VHDX files?
You may have imported a Hyper-V virtual machine into VirtualBox, which uses the VHDX format. VirtualBox supports importing and exporting between VDI and VHDX formats seamlessly. You can convert a VDI to VHDX using the
VBoxManage clonemedium command if you need compatibility with other hypervisors.
Is it safe to clear the VirtualBox cache?
Clearing the VirtualBox cache in
%LOCALAPPDATA%\VirtualBox is generally safe and can resolve GUI glitches or snapshot issues. However, it does not delete your virtual machines or disk images. It only removes temporary log files and cached interface data, which will regenerate upon next launch.
How do I fix network settings in an Ubuntu VM?
If your Ubuntu VM loses connectivity after moving or cloning, you may need to reconfigure its network adapter. Check the MAC address in VirtualBox settings and ensure it matches the configuration inside the guest OS. Our guide on
Define Network Settings Inside Ubuntu Virtual Machine in VirtualBox provides step-by-step instructions for resetting network interfaces in Linux guests.