Hello,
I installed CVFMS on my Mac with the .pkg
installer some time ago (it is version 2.11.5) but I don’t need it anymore.
How can I uninstall it ? I have found way to list of the files in the .pkg
file (see here for instance) but I don’t know if deleting them would be enough (as the .pkg
can install other files).
Any advice ?
Thanks
Hello!
Yes, you can just remove all installed files, they should all be listed by the .pkg. You could also remove MacFuse if it is not needed by any other application. I think pkgutil also has an option to “forget” the pkg once the files are removed.
Cheers,
Valentin
Thank you.
For the record, here is the script I used (I’m not responsible if you use it and destroy you machine :):
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
# List content from the BOM file
pkg_content=( $(lsbom /private/var/db/receipts/ch.cern.cvmfs.pkg.Core.bom | cut -f 1) )
# Path are relative to /usr/local
for i in "${!pkg_content[@]}"; do
pkg_content[$i]="${pkg_content[$i]/.//usr/local}"
done
# Remove files
for name in ${pkg_content[@]}
do
if [ -f $name ]
then
echo Will remove $name
rm $name
fi
done
# Remove empty directories
for name in ${pkg_content[@]}
do
if [ -d $name ]
then
hardlinks=$(gstat -c %h $name)
if [ ${hardlinks} -eq 2 ]
then
echo Will remove $name
rmdir $name
fi
fi
done
# Delete entry in /private/var/db/receipts/
pkgutil --forget ch.cern.cvmfs.pkg.Core
After running this, I found that there are still some files related to CVMFS:
$ find / -type f -wholename '*cvmfs*' 2>/dev/null
/System/Volumes/Data/private/etc/sudoers.cvmfs_backup
/System/Volumes/Data/private/var/lib/cvmfs/Library/Preferences/com.apple.LaunchServices/com.apple.LaunchServices.plist
I’m pretty sure /System/Volumes/Data/private/etc/sudoers.cvmfs_backup
was done by the installer which also modified /System/Volumes/Data/private/etc/sudoers
. I will revert this.
Do you know about /System/Volumes/Data/private/var/lib/cvmfs/Library/Preferences/com.apple.LaunchServices/com.apple.LaunchServices.plist
?
There are also some symlinks, empty directories, not to mention the cvmfs
user and group. So just deleting the files listed in the pkg
is not enough.
I will clean up this but maybe it would be nice to add an uninstaller script for MacOS.
Last but not least, I can’t remove the /cvmfs
mount point:
$ sudo rm -rf /cvmfs
rm: /cvmfs: Read-only file system
$ sudo mount | grep cvmfs
Any idea to finish the uninstallation ? I noticed that there is a /Library/Filesystems/cvmfs.fs/
directory.