Delete a file from desktop in Single User Mode (macOS)

To access to macOS in single user mode, press cmd + s just after rebooting your computer. Wait for a few seconds, and your computer will display a command terminal.

1. Allow write access

If your macOS is new, run:

mount -uw /System/Volumes/Data

If you get an error running the previous command, then:

/sbin/mount -uw /

This is a critical step, since it will allow you to access with read/write permission. ✏️

2. Go to Desktop:

cd Users/Erik/Desktop

Change Erik for the name of your user. If you don't know it:

cd Users && ls

This command will display the users on your machine. After you know the name of the main user, run cd Users/YOUR_USERNAME/Desktop again.

3. Remove files

Display the files from your Desktop by running ls command.

To remove a file:

rm file.jpg

To remove a folder:

rm -r folder

To remove the trash:

rm -rf ~/.Trash

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.