Can't delete a directory

Joined
Dec 16, 2021
Messages
589
Reaction score
74
Points
28
The HD I usd to store my pictures has acquired a directory called iPhone.photoslibrary. I did not create it. I don't know where it came from and I can't seem to delete it. How do I get rid of it?
 
Joined
Jan 1, 2009
Messages
15,512
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
It's not a directory, it's a library created by Photos, either on the Mac, or on the Phone and synced to the Mac. It may even be where you are actually storing your pictures, if you use Photos for that.
 

IWT


Joined
Jan 23, 2009
Messages
10,290
Reaction score
2,230
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sonoma 14.4.1 Apple 5K Retina Studio Monitor
a directory called iPhone.photoslibrary.

Don't delete it. I agree entirely with Jake as to its likely function & relevance.

Ian
 
OP
rbpeirce
Joined
Dec 16, 2021
Messages
589
Reaction score
74
Points
28
I know it is a library. However, it doesn't seem to be connected in any way to my current iPhone. It was created when I had my previous iPhone and I have not consciously added anything to it, nor do I know how to access it. It just doesn't seem to belong.
 
Joined
Jan 1, 2009
Messages
15,512
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
You access it by opening Photos, then open Settings/Preferences and on the General tab look at Library Location. Note what your current default library is and where it is stored. You can change the library from whatever it is now to the iPhone one and Photos will open it for you so you can see what is in it. You can also do similar by holding down "Option" then click on the Photos app to launch it. You then get a dialog to pick the library you want to open. Again, note the name and location of your current library so you can get back to it without a lot of hassle.

Once you have opened the iPhone library, look at the images to make sure you don't need any of them. Once you are content that you don't need it you can close Photos, then relaunch with Option held down and point back to your default library. Once that is done, you can decide what to do with the iPhone photos library file. If you are 100% certain it isn't being synced to your iPhone, you can delete it. Personally I'd make a copy of it before I did that, but you do whatever.

BTW, you called it a directory, we just tried to correct that inaccurate statement. Then you responded "I know it is a library." But you called it a directory. Tech terms are very precisely defined, and it helps a lot to be precise in your posts to avoid confusion both for us and for others who may see this thread later on when trying to solve their own problems by searching.
 
OP
rbpeirce
Joined
Dec 16, 2021
Messages
589
Reaction score
74
Points
28
I tried opening the library in Photos but it said it can't be opened from within Ventura. I need Monterey or older. I also tried to import it into the Ventura library and it came up with about 1500 really old images. I must have actually used an earlier version of Photos at some point in the distant past but it was on my computer not my iPhone, hence the confusion with the library title. However, that library should have been somewhere else. So, I'd still like to know how to delete it from my external HD.

Directory vs. Library really depends on how you look at it. From terminal, "ls -al@' says it is a directory with ACLs. Finder says it is a Photo Library. Being an old Unix guy, more than 50 years, I still do a lot with terminal. I'm sorry for any confusion.
 
Joined
Jan 1, 2009
Messages
15,512
Reaction score
3,874
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
Use Finder. Go to the file, right click and then "Get Info." Click on the lock icon and provide an admin password to unlock it. Now in the permissions area, give yourself permission to read and write. Click on the "apply to all" if it shows up (it did not for me, but just covering all the bases). Now you should have authority to delete it.

If you want to try Terminal can you use "sudo rm" to do it? I don't know if that is sufficient to override the permissions on the library or not. It's not really a "normal" file or folder or directory, it's a special object for use by Photos.
 
OP
rbpeirce
Joined
Dec 16, 2021
Messages
589
Reaction score
74
Points
28
Funny. It wasn't locked and I had full permission but it didn't work before. This time it did and I have no idea why. Thanks.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top