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:

terminal
mount -uw /System/Volumes/Data

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

terminal
/sbin/mount -uw /

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

2. Go to Desktop:

terminal
cd Users/Erik/Desktop

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

terminal
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:

terminal
rm file.jpg

To remove a folder:

terminal
rm -r folder

To remove the trash:

terminal
rm -rf ~/.Trash

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