19

I tried to delete files in the default desktop picture directory (/System/Library/Desktop Pictures) on macOS 10.15 Catalina with sudo permission but failed.

$ pwd
/System/Library/Desktop Pictures

$ sudo rm *.heic
Password:
rm: cannot remove 'Catalina Clouds.heic': Operation not permitted

Is there a hassle-free way to solve this problem?

Teddy C
  • 1,718
  • 1
    How is this a 'problem'? Why do you need to delete them? Just don't use them. – benwiggy Nov 19 '19 at 07:36
  • 24
    @benwiggy These wallpapers are taking ~1GB space and I don't need them – Teddy C Nov 19 '19 at 07:40
  • 1
    The entire system is only c. 12Gb. If you were to remove all the files that you personally are not going to use, you might save 6Gb at most. I know Apple sells stuff with 128 Gb, but if you need more, then you can use Cloud services or a USB low-profile drive. – benwiggy Nov 19 '19 at 07:45
  • 18
    Saving the additional 1GB (and now 2.1GB for me after upgrading to Catalina) really adds up on a 128GB SSD MBP. – Willem van Ketwich Jan 04 '20 at 21:52
  • 12
    @WillemvanKetwich yeah it's absolutely bonkers that people are challenging OP like this. It's nearly 2% of the usable drive space for unused pictures. – Corey Mar 28 '20 at 16:10
  • 5
    @benwiggy if the entire system is 12 GB then that means the pictures take up 17.5% of the system. Pictures dude. Probably try to empathize with people who might consider deleting them, what do you think. – Corey Mar 28 '20 at 16:13
  • 5
    I have enough disk space - I just want to delete unneeded stuff and have more control over the system. – Teddy C Mar 28 '20 at 16:18
  • 3
    On a MacBook Air (13-inch, Early 2014), every GB counts. – David Airapetyan May 02 '20 at 19:22

3 Answers3

13

As a general rule I do not recommend deleting system files, however, if you really want to remove the default wallpapers you can do the following:

  1. Boot to macOS Recovery by pressing ⌘R when booting the Mac.
  2. Using Terminal, from the Utilities menu, use the following commands:

    cd /Volumes/Macintosh\ HD/System/Library/Desktop\ Pictures
    rm *.heic
    reboot
    
user3439894
  • 58,676
  • 2
    When in recovery mode I can't access such folder. The volum is called "macos base" or something. – Nuthinking May 06 '20 at 08:28
  • 1
    @Nuthinking I realized the same, but now I can't find the Desktop Pictures folder in there. – Mathy Jun 06 '20 at 10:01
  • 1
    I even tried find / *.heic -print but couldn't find any. – Mathy Jun 06 '20 at 10:34
  • 2
    No longer works on Big Sur, the SIP is even stronger. I posted a new answer with details. – Mike Hardy Mar 08 '21 at 14:55
  • @Mike Hardy, RE: "No longer works on Big Sur" -- The question was specifically and explicitly about macOS Catalina and at the time it was posted macOS Big Sur had not yet even been announced and didn't exist outside of Apple itself and therefore totally irrelevant. – user3439894 Mar 08 '21 at 15:14
  • @user3439894 The answer Mike gave is helpful to me as Google sent me to this page. – liteowl Mar 13 '21 at 16:34
7

Catalina now installs /System as part of a read-only volume, so it cannot be altered whilst in use.

You can modify or delete those files when booted to Recovery, but bear in mind that Apple may well restore them in an update to the OS.

benwiggy
  • 35,635
  • You said "Catalina now installs /System as a read-only volume, so it cannot be altered.", well/System is a directory/folder not a volume as you so state, as Macintosh HD is the volume which is mounted at / and it can be altered! -- It can be altered easily from Terminal while booted to macOS Recovery or from a normal boot if SIP has been disabled and the volume remounted with sudo mount -uw /. Your answer is completely false and should be deleted! – user3439894 Nov 20 '19 at 05:28
  • ... or edited if someone is willing to do so. – anki Nov 20 '19 at 07:36
  • ... or slightly amended to improve fastidiousness. Whether those actions are done 'easily' is subjective, perhaps. – benwiggy Nov 20 '19 at 11:24
  • @user3439894 /System is actually a different volume under the hood in Catalina. – Wowfunhappy Mar 28 '20 at 16:26
  • 1
    @Wowfunhappy, RE: "/System is actually a different volume under the hood in Catalina." -- /System is not a different volume! /System is a directory in the root of e.g. Macintosh HD and is a part of the Core.pkg in the InstallESD.dmg in the Install macOS Catalina.app bundle which shows is as a directory in the root, it is not a different volume, and the Core.pkg is written to the / of the Startup Disk. You are probably confused with /System/Volumes/Data which gets mounted, but /System is a root directory as in previous versions of macOS! – user3439894 Mar 28 '20 at 18:06
  • No longer works on Big Sur, the SIP is even stronger. I posted a new answer with details. – Mike Hardy Mar 08 '21 at 14:55
  • Worked for me on Catalina. – auspicious99 Jul 11 '21 at 09:43
6

As of Big Sur this is no longer really feasible.

Why not?

The root filesystem on macOS has been protected strongly forever, with each of the last few OS revisions increasing protections (with SIP, etc)

macOS mounts the System area read-only and as of Big Sur makes sure to only trust it if it has not been changed.

If you violate that trust, certain parts of the system won't work again (specifically: you will not be able to re-enable FileVault afterwards)

If deleting the *.heic files is that important to you though, follow this guide Can I mount the root (system) filesystem as writable in Big Sur? (including it's warnings!)

Then from Recovery you may rm -f *.heic /Volumes/<your hard drive name>/System/Library/Desktop Pictures

I really wish I had that space back, but I need FileVault more so I gave up.

  • 2
    There are probably easier ways to regain 1 GB of disk space :-) – nohillside Mar 08 '21 at 14:58
  • @nohillside, I have to agree and if one is really worried about 1 GB of disk space, then they probably have bigger issues to deal with. – user3439894 Mar 08 '21 at 15:17
  • The question the OP was specifically and explicitly about macOS Catalina and at the time it was posted macOS Big Sur had not yet even been announced and didn't exist outside of Apple itself and therefore this answer is totally irrelevant to the actual question asked. – user3439894 Mar 08 '21 at 15:19
  • @nohillside But whatever easier path you take to save 1 GB of space, you could then save another 1 GB by deleting Desktop Pictures. :D – Wowfunhappy Mar 08 '21 at 16:13
  • @Wowfunhappy An external drive is probably cheaper than going through all the steps required to delete the files (and redoing them after updates)... – nohillside Mar 08 '21 at 16:29
  • 2
    Sure sure - note I downvoted no things :-), just trying to provide current info for current people that show up here. Never assume someone's problems or situation though. I use a lot of OSX-KVM VMs and space is a premium. If you know nothing of people's reasons you should not question their motivation – Mike Hardy Mar 09 '21 at 15:07