Linux Script to remove Parallels Desktop

Linux Script to remove Parallels Desktop

MacBook Pro 14″, macOS 12.5

Posted on Apr 5, 2023 6:34 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 18, 2023 9:54 AM

There is no Parallels Desktop host software available for Linux — only selected versions of macOS, and thus, Linux specific commands won't work in a script.

4 replies

Apr 18, 2023 8:51 AM in response to jklu 09spioghjopigjipogjk

This script assumes you have installed Parallels Desktop via a package manager like 'apt', 'yum', or 'dnf'. If you have installed it in a different way, you may need to modify the script accordingly.


Create a file named 'remove_parallels.sh' and copy the following content into it:


#!/bin/bash

# Check if the user is running the script as root
if [ "$(id -u)" -ne 0 ]; then
  echo "This script must be run as root. Use 'sudo' to run this script."
  exit 1
fi

# Remove Parallels Desktop
echo "Removing Parallels Desktop..."
if command -v apt &> /dev/null; then
  apt remove --purge -y parallels-desktop
elif command -v yum &> /dev/null; then
  yum remove -y parallels-desktop
elif command -v dnf &> /dev/null; then
  dnf remove -y parallels-desktop
else
  echo "Could not detect your package manager. Please remove Parallels Desktop manually."
  exit 1
fi

# Remove Parallels configuration files and virtual machines
echo "Removing Parallels configuration files and virtual machines..."
rm -rf ~/.parallels
rm -rf ~/Documents/Parallels
rm -rf /usr/local/Parallels

echo "Parallels Desktop has been completely removed."


Save the file and then make it executable with the following command:


chmod +x remove_parallels.sh


Now, run the script as root (or with 'sudo') to completely remove Parallels Desktop:


sudo ./remove_parallels.sh


That should do it!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Linux Script to remove Parallels Desktop

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.