Removing stubborn files using Terminal not permitted

Hi, (I'm running Sequoia 15.2...) I'm having to manually clean up an old Wacom installation. There are a few directories that need to be removed but won't delete, even with Admin rights.

I'm not comfortable in the Terminal really but trying both sudo and su rmdir <directory> gives me "Operation not permitted" even when I log in as an Admin.

What do I do? :-)

Thanks

S

(If it matters, the paths in question are:

/Library/Frameworks/WacomMultiTouch.Framework

/Library/Preferences/Tablet

/Library/PreferencePanes/WacomTablet.prefpane

)

Mac mini, macOS 15.2

Posted on Jan 8, 2025 2:54 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 12, 2025 3:04 AM

Zurarczurx wrote:

I talked to a couple of ex-colleagues about this and they are also stumped. When you fix it please could you come back and tell us how. Good luck.

I found a solution, if not a reason...


The command:

ls -lO@d /Library/Preferences/Tablet


Gives me:

drwxrwxr-x@ 2 root admin restricted 64 7 Jan 20:37 /Library/Preferences/Tablet


The trailing "@" after the permissions indicate "Extended attributes".


This seems to mean that they are particularly protected by the system. I guess this is due to a slightly borked migration from the TimeMachine.


The solution was to: 


Boot into Recovery mode. This seems to give additional rights to the Terminal...

Use the < csrutil disable > command in Terminal

Reboot to a normal account

Remove the directories by conventional means. I just used the Finder…

Reboot to Recovery and use < csrutil enable > in Terminal

Reboot as normal.


I haven't tried reinstalling the Wacom driver as I've decided to replace it with a Huion but at least I managed to delete those stubborn files...


Thanks for your help! :-)

31 replies
Question marked as Top-ranking reply

Jan 12, 2025 3:04 AM in response to Zurarczurx

Zurarczurx wrote:

I talked to a couple of ex-colleagues about this and they are also stumped. When you fix it please could you come back and tell us how. Good luck.

I found a solution, if not a reason...


The command:

ls -lO@d /Library/Preferences/Tablet


Gives me:

drwxrwxr-x@ 2 root admin restricted 64 7 Jan 20:37 /Library/Preferences/Tablet


The trailing "@" after the permissions indicate "Extended attributes".


This seems to mean that they are particularly protected by the system. I guess this is due to a slightly borked migration from the TimeMachine.


The solution was to: 


Boot into Recovery mode. This seems to give additional rights to the Terminal...

Use the < csrutil disable > command in Terminal

Reboot to a normal account

Remove the directories by conventional means. I just used the Finder…

Reboot to Recovery and use < csrutil enable > in Terminal

Reboot as normal.


I haven't tried reinstalling the Wacom driver as I've decided to replace it with a Huion but at least I managed to delete those stubborn files...


Thanks for your help! :-)

Jan 8, 2025 5:16 AM in response to smartin2021

Stay out of the Terminal if it does not come as second nature to you.


In the Finder, press shfit+cmd+G to open the Go To Folder dialog. Enter /Library/Frameworks and a return. That opens a Finder window on that folder. Locate the WacomMultiTouch.framework and drag it to the Trash on the Dock. You will be prompted for your Admin password.


Then do the same thing for the Tablet and WacomTablet.prefpane in the /Library/Preferences and /Library/PreferencePanes locations respectively.

Jan 12, 2025 4:53 AM in response to smartin2021

I found a solution, if not a reason...

The command:
ls -lO@d /Library/Preferences/Tablet

Gives me:
drwxrwxr-x@ 2 root admin restricted 64 7 Jan 20:37 /Library/Preferences/Tablet

The trailing "@" after the permissions indicate "Extended attributes".

This seems to mean that they are particularly protected by the system.

It isn’t the extended attributes but the Restricted flag. That means it is protected by System Integrity Protection (aka “rootless”). You disabled it with crsutil disable.

On Unix root is all powerful. On modern macOS, Apple has disabled much of that power with SIP.

How it managed to get protected by SIP I don’t know.

Jan 8, 2025 6:47 AM in response to smartin2021

smartin2021 wrote:


Barney-15E wrote:


smartin2021 wrote:

Barney,
There's no sound and it doesn't really move at all when I drag it to the trash, not as you'd expect it to move. Same if I do Command+Backspace. No sound, nothing.
It's as if it never gets to the Trash.
That doesn’t indicate a permission problem. There is something else going on. My thoughts are you have wasted more time than it is worth. They will have no effect on your Mac unless you need to reinstall the tablet software.
I *do* need to reinstall the software :-) At the moment the new installation fails with no useful error message. The only thing we can think of is to completely clean up the old files...

It is likely failing because it cannot write to those files. You may be able to remove them in Terminal in Recovery. You would need to mount the Data volume if it is encrypted, otherwise it will auto mount. The third-party folders are stored in the Data volume. It should have a similar structure to what you see in Finder where it is combined with the System Volume.

Jan 8, 2025 7:21 AM in response to Barney-15E

Barney-15E wrote:


smartin2021 wrote:


Barney-15E wrote:


smartin2021 wrote:

Barney,
There's no sound and it doesn't really move at all when I drag it to the trash, not as you'd expect it to move. Same if I do Command+Backspace. No sound, nothing.
It's as if it never gets to the Trash.
That doesn’t indicate a permission problem. There is something else going on. My thoughts are you have wasted more time than it is worth. They will have no effect on your Mac unless you need to reinstall the tablet software.
I *do* need to reinstall the software :-) At the moment the new installation fails with no useful error message. The only thing we can think of is to completely clean up the old files...
It is likely failing because it cannot write to those files. You may be able to remove them in Terminal in Recovery. You would need to mount the Data volume if it is encrypted, otherwise it will auto mount. The third-party folders are stored in the Data volume. It should have a similar structure to what you see in Finder where it is combined with the System Volume.

I just tried "Find any File" app and it's giving permissions errors and "access" errors... Found a load more files which I did get rid of...

If all else fails I'll take my courage in both hands and try Terminal in recovery mode. Sounds a bit above me though...

Jan 8, 2025 8:01 AM in response to Barney-15E

Barney-15E wrote:


smartin2021 wrote:


Barney-15E wrote:


smartin2021 wrote:

Barney,
There's no sound and it doesn't really move at all when I drag it to the trash, not as you'd expect it to move. Same if I do Command+Backspace. No sound, nothing.
It's as if it never gets to the Trash.
That doesn’t indicate a permission problem. There is something else going on. My thoughts are you have wasted more time than it is worth. They will have no effect on your Mac unless you need to reinstall the tablet software.
I *do* need to reinstall the software :-) At the moment the new installation fails with no useful error message. The only thing we can think of is to completely clean up the old files...
It is likely failing because it cannot write to those files. You may be able to remove them in Terminal in Recovery. You would need to mount the Data volume if it is encrypted, otherwise it will auto mount. The third-party folders are stored in the Data volume. It should have a similar structure to what you see in Finder where it is combined with the System Volume.

I discovered that there's such a thing as "Directory Utility" How to enable the root user or change the root password on Mac – Apple Support (UK)

*Still* doesn't do the trick...

Jan 8, 2025 5:51 AM in response to smartin2021

How did you track down all the Wacom files in the first place - or are you just responding to an error message you get on install or did you use a cleaner app to find and remove them. Asking because some cleaner apps can mess up the file system.


If I were you the things I'd try would be:


1 - rename the folders to zzzanoyingfolder or something unlikely to mess with other apps and try the re-install again. It will be interesting to see if you're allowed to rename them.


2 is your tablet connected while you are doing this? Have you tried deleting with the tablet connected/disconnected?


3 get a good search app and search your HD for files with Wacom and delete them (carefully, of course). They might be preventing the deletion of the the folders. This would be an act of desperation, admittedly, cos sudo rmdir is usually more guilty of deleting useable stuff than not being able to delete useless stuff. Spotlight won't find anything useful. I use easyfind, but other search apps are available.





Jan 8, 2025 6:23 AM in response to smartin2021

smartin2021 wrote:

Threading here is a disaster...

How did you track down all the Wacom files in the first place - or are you just responding to an error message you get on install or did you use a cleaner app to find and remove them. Asking because some cleaner apps can mess up the file system.

I raised a ticket with Wacom and they pointed me at a help page to manually uninstall.

If I were you the things I'd try would be:

1 - rename the folders to zzzanoyingfolder or something unlikely to mess with other apps and try the re-install again. It will be interesting to see if you're allowed to rename them.

Can't rename them :-)

2 is your tablet connected while you are doing this? Have you tried deleting with the tablet connected/disconnected?

It's disconnected...

3 get a good search app and search your HD for files with Wacom and delete them (carefully, of course). They might be preventing the deletion of the the folders. This would be an act of desperation, admittedly, cos sudo rmdir is usually more guilty of deleting useable stuff than not being able to delete useless stuff. Spotlight won't find anything useful. I use easyfind, but other search apps are available.

It's just these three directories that are left, according to Wacom at least...

There's no threading. You can use the quotes button below to add text (clumsily) so people know what you're responding to.


Try connecting the tablet and deleting them.


What happens when you try to rename them? It should ask for an admin password. It should also ask for an admin password when you try to delete them and the fact that it didn't is very odd

Jan 8, 2025 3:03 AM in response to smartin2021

You need to check the subdirectories - if they are protected or there are protected files in them it won't let you remove the top level directory until they have been uprotected or removed. You could use the recursive "-r" switch with the rmdir command when removing the top level directory, which will apply the rmdir recursively down the folder tree. Be VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY VERY careful using -r with the rmdir command because it will delete everything below it. People have been know to unintentionally wipe their hard drive with this command. Personally, I'd work my way to the bottom of the directory list and rmdir them moving upwards because the -r switch scares the willies out of me.

Jan 8, 2025 6:39 AM in response to Zurarczurx

Zurarczurx wrote:
There's no threading. You can use the quotes button below to add text (clumsily) so people know what you're responding to.

Try connecting the tablet and deleting them.

What happens when you try to rename them? It should ask for an admin password. It should also ask for an admin password when you try to delete them and the fact that it didn't is very odd

1) Thanks :-)


2) It's a thought but makes no difference sadly...


3) Doesn't ask for password, just doesn't respond at all in the usual way. Can't select the name to change it.

Jan 8, 2025 6:17 AM in response to Zurarczurx

Threading here is a disaster...


How did you track down all the Wacom files in the first place - or are you just responding to an error message you get on install or did you use a cleaner app to find and remove them. Asking because some cleaner apps can mess up the file system.


I raised a ticket with Wacom and they pointed me at a help page to manually uninstall.


If I were you the things I'd try would be:


1 - rename the folders to zzzanoyingfolder or something unlikely to mess with other apps and try the re-install again. It will be interesting to see if you're allowed to rename them.


Can't rename them :-)


2 is your tablet connected while you are doing this? Have you tried deleting with the tablet connected/disconnected?


It's disconnected...


3 get a good search app and search your HD for files with Wacom and delete them (carefully, of course). They might be preventing the deletion of the the folders. This would be an act of desperation, admittedly, cos sudo rmdir is usually more guilty of deleting useable stuff than not being able to delete useless stuff. Spotlight won't find anything useful. I use easyfind, but other search apps are available.


It's just these three directories that are left, according to Wacom at least...

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.

Removing stubborn files using Terminal not permitted

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