can't delete files from desktop with High Sierra

I have some file folders and a PDF I saved to my desktop that I cannot delete. The files will act like they are going into the trash when I drag them, but then move right back on the desktop. The PDF keeps telling me I do not have permissions to access all the items in it. I have tried to reset permissions to no avail. Any suggestions?

Mac mini, iOS 10.3.3, On IOS 10.13.4

Posted on May 3, 2018 8:38 AM

Reply
Question marked as Top-ranking reply

Posted on May 4, 2018 1:45 PM

Sorry, I didn't edit all the way through in my post. So back in Teminal:

$ cd ~/Desktop

$ rm -f ./avalon_ebrochure.pdf


For Folder:

# You must escape file/folder names containing white-space or other reserved characters in the Terminal.

$ file ./"Verizon Receipts"

$ rm -rf ./"Verizon Receipts"


Did either, or both of these return without any message in the Terminal (which would mean they were removed)?

29 replies
Question marked as Top-ranking reply

May 4, 2018 1:45 PM in response to Title Man

Sorry, I didn't edit all the way through in my post. So back in Teminal:

$ cd ~/Desktop

$ rm -f ./avalon_ebrochure.pdf


For Folder:

# You must escape file/folder names containing white-space or other reserved characters in the Terminal.

$ file ./"Verizon Receipts"

$ rm -rf ./"Verizon Receipts"


Did either, or both of these return without any message in the Terminal (which would mean they were removed)?

May 4, 2018 4:36 PM in response to MrHoffman

Results:

Roberts-Mac-mini:~ bob$ id

uid=502(bob) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81( _appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_ analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),39 9(com.apple.access_ssh)

Roberts-Mac-mini:~ bob$ ls -aled@ ./Verizon\ Receipts

ls: ./Verizon Receipts: No such file or directory

Roberts-Mac-mini:~ bob$ ls -aled@ ~/Desktop

drwxr-xr-x+ 11 bob staff 374 Jun 26 2016 /Users/bob/Desktop

0: group:everyone deny delete

Roberts-Mac-mini:~ bob$ ls -aled@ ~/.Trash

drwx------ 5 bob staff 170 May 4 11:27 /Users/bob/.Trash

Roberts-Mac-mini:~ bob$

May 4, 2018 11:31 AM in response to Title Man

Just says no such file or directory

Are you syncing your Desktop and documents folder with iCloud Drive?

The PDF keeps telling me I do not have permissions to access all the items in it.

What does "File > Get Info" show for the PDF file? Does it say "Kind: PDF document"? Or does it show "Kind: Folder" or similar?

If the

PDF is shown as a folder try to enter

rm -r

into the Terminal, followed by a space character, and then drag the PDF behind the rm -r

May 4, 2018 3:03 PM in response to Title Man

Spaces and punctuation matter at the command line.


You can cut-and-paste the lines shown below into the command line session, entering one command at a time and executing each command separately.

ls -aled@ ./Verizon\ Receipts

ls -aled@ ~/Desktop


The transcription errors are why there were No such file or directory errors reported for each.


Please re-enter the two commands shown above, and post the output.


The file ./avalon_ebrochure.pdf should be deletable with the rm command that was tried earlier (and that apparently also failed) and all without resorting to the use of sudo, which implies that there might be a problem with the parent directory ~/Desktop settings.

May 6, 2018 5:40 AM in response to Title Man

Title Man wrote:

Also downloaded Avast Security and ran a scan and detected 45 infections. Deleted those

Ouch! I would have warned you against Avast. 45 infections! That's practically impossible. Avast is known for for detecting false positives in Mac OS. I'd suggest uninstalling that abomination as per the developers instructions. I hope it didn't do too much damage.


At this point, I'd reformat the hard drive, reinstall Mac OS and start fresh. It probably will be the easiest and fastest way to sort things out.

May 4, 2018 10:34 AM in response to Title Man

Title Man wrote:


I tried entering a space after the rm in the terminal and for the PDF says Operation not permitted and for the file folder it says it is a directory. Again not letting me delete either.

What folder, is your PDF document inside a folder?

Also did you check to see if there was a null string as Viking suggested in the file or folder on your Desktop, not in Terminal?

May 4, 2018 10:50 AM in response to macjack

pdf not inside a folder, if I get info here's what the pdf file says: avalon_ebrochure.pdf. as far as the folder I was talking about, I created some folders on my desktop to hold receipts and info from the net instead of printing the info. One file was called Verizon Receipts and it's extension is: Verizon Receipts - if I get info on that one file.

May 4, 2018 1:24 PM in response to VikingOSX

Here's results:

For PDF

Roberts-Mac-mini:~ bob$ cd ~/Desktop

Roberts-Mac-mini:Desktop bob$ file ./avalon_ebrochure.pdf

./avalon_ebrochure.pdf: PDF document, version 1.5

Roberts-Mac-mini:Desktop bob$ rm -if ./foobar.pdf


For folder:

Roberts-Mac-mini:Desktop bob$ cd ~/Desktop

Roberts-Mac-mini:Desktop bob$ file ./Verison Receipts

./Verison: cannot open `./Verison' (No such file or directory)

Receipts: directory

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.

can't delete files from desktop with High Sierra

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