Ridiculous receipts

When trying to free up some disk space on my PowerBook (3 GB remaining...), I ran across the Receipts folder. Now, according to articles like
<http://docs.info.apple.com/article.html?artnum=25768>
these receipts "do not take up a lot of disk space". Ahum...

My receipts folder is a whopping 409 MB. Just for storing information about what software was installed where?! I took a closer look, sorting the receipts by size. The top one was Quicktime651, which is 19 MB. Very intrigued, I looked at the contents. Amazing... Most of the space consists of...

15 IDENTICAL copies of the same tiff-file "Background.tiff", more than a megabyte each, in different language folders!!!

I can't even imagine what a single tiff file would do in a receipt. What's the purpose of receipts? Keeping track of what was installed where, right? Why are all those files in there then?! Why not just a little file with a list of file names and locations?

Can somebody tell me how these receipts work, if I can trim them (throwing out at least those TIFF-files?), or delete a bunch of them altogether? I have Quicktime 7, so why is there still a receipt for 6.5.1 taking up disk space? Surely I can delete anything having to do with older versions of Quicktime?

I have read some posts saying "ooooh, don't mess with those, or you won't be able to repair permissions anymore". But it's beyond me why reparing permissions would somehow require 15 identical tiff-files with Quicktime logo's. A little more insight would really be nice. What exactly is the problem with repairing permissions? Why does it need all those files?

And Software Update... does it really need more than just the name of the package to tell whether or not it has installed something? Can't I just remove the contents of those packages so just the outer shell is left?

PowerBook G4, Mac OS X (10.4.1)

Posted on Jun 1, 2006 2:17 AM

Reply
47 replies

Jun 3, 2006 10:06 AM in response to Michel Colman

I still don't understand what any tiff file (even if
it's only one) is doing inside a receipt, not to
mention some of the other files in there, and why
many of these receipts have to be the size of the
complete works of shakespeare if they only serve as a
record of the installation.


A receipts package is more than just a simple record that something was installed. Think of it as a repository for metadata relating to the app & its installation, including resources that can be critical to the "it just works" behavior we expect from Apple. For instance, the package can tell you, the OS, or some utility if the referenced installer package requires a restart, is a required or optional installation, can overwrite a later version or not, requires updating other files (like installed languages), the default install location & number of files installed, & many other details about the installer itself.

Moreover, much of this metadata is in XML format, which means every item of info requires property & class tags as well as a value (the info itself). This is a very cool thing: any XML-aware app can find the info it needs without requiring that specific info about the metadata file format is coded into the app itself. So, while XML might more than double the size of the info file, it can save tons of file space by reducing the size of the code various apps might require to access it, as well as greatly improve stability & reliability of the app by verifying that the info is of the proper form (e.g., string, boolean, etc.) before trying to use it.


I do understand the need for different languages. But
the problem is that some of them contain lots of
non-language-specific items (like the identical tiffs
Quicktime651), which are then duplicated over all the
languages.


Different languages are only one part of localization. Think of localization as sets of resources specific to various geographic regions, which can cope with not just language differences but cultural & legal ones as well. Again, this is a very cool thing: it allows apps to be written independently of these considerations, which otherwise could lead to very bloated apps.

For instance, an image that is perfectly acceptable in one culture may be offensive or meaningless in another, or infringe on some local copyright or its equivalent. Instead of including a direct reference to the image file in the app, if the reference is to a lookup in the localization, the differences can be handled systematically by the OS, which is aware of the location(s) chosen by the user(s), instead of by the app, which probably isn't.

Also, lots of space is still being wasted in other
areas. Like a package with 700 individual little tiff
files (each one a block on the disk), while they
could easily be bundled in one big tiff file, etc,
etc...


Bundling is easy, but as the above should suggest, choosing the appropriate resources to use from the bundle can be challenging, particularly if you want the process to be transparent to the user(s), consistent across apps (including core OS ones that run behind the scenes), & efficient both in terms of total file space & code execution.

IOW, the knowledge to handle arbitrary data structures has to be stored somewhere if you want your Mac to have that functionality. The choice boils down to storing it on the hard drive & letting the machine use it directly or storing it in your head & feeding it to the machine as required.

I think it is an easy choice to make. 😉

Jun 3, 2006 11:05 AM in response to Jerrymyah

Don't think of the size requirement in terms of storing data but in terms of the much more formidable challenge to encode knowledge about what the data means into forms the OS can understand & use.

It is analogous to storing a paper receipt's literal content vs. storing that plus how to identify & classify every item on it (like as a description, a price, or whatever), all in a way that it can be adapted to any language or culture for whatever purpose someone may devise.

In this frame of reference, a megabyte is a very modest amount of storage space.

Jun 5, 2006 4:34 AM in response to Jeff Hubbach

I think my laptop came with 10.2, so most of my receipts folder is for older versions. I guess the old Quicktime packages (6.x) can definitely go into the trash bin. Problem is, which files can I throw away safely? Why doesn't the system do this for me? New update, add new receipt, delete old receipt (or combine old with new in an efficient way)

Also, newer Quicktime packages do appear to have a slimmed down background tiff. But the complete package is still almost 5 MB, and most of it consists of readme-files and even a complete installer application, called "QT6installer.app" (inside the Quicktime 7.1.1 package!). What use is that application, especially after the installation?

Jun 5, 2006 4:50 AM in response to R C-R

I can understand that an installer package has to contain information like readme-files in different languages, background images, code to check for older versions, etc... What I don't understand is: what's all this stuff doing in a receipt? Something that is only meant to be used afterwards? The Quicktime 7.1.1 receipt contains an 800k application called "QT6Installer.app". Why? Will this application EVER be executed after the installation? And of course there's a seperate copy in Quicktime70.pkg, Quicktime701.pkg, Quicktime702.pkg, Quicktime703.pkg, Quicktime704.pkg, Quicktime71.pkg,...

And then don't get me started about XML 😉 The information whether or not the computer needs to be restarted, could be encoded in 1 bit. But it's probably encoded like <computer-needs-to-be-restarted-after-the-installation-is-complete> true </computer-needs-to-be-restarted-after-the-installation-is-complete>, in this case (hopefully exaggerated) about a thousand times as much space...

By the way, the "bom"-files inside the receipt (probably the most important component, which actually stores useful information) do not appear to be xml. In fact, very little of the receipt is in xml format.

Jun 5, 2006 4:54 AM in response to Michel Colman

I must admit, my receipts folder is 141MB and is too large for my liking. Periodically I go through it and purge manually. But the average system user will never do this just like the average PC user never deletes temporary files (and they can end up with GB of them!).

I had to know to do it, somehow a couple of years back I stumbled across the receipts folder and just had a look about. After I went from Panther to Tiger I figured it was ok to delete the Panther stuff, for example.

Jun 5, 2006 4:58 AM in response to R C-R

I still don't see the need for readme-files containing pictures of surfing teenagers inside a Quicktime receipt.

If you want an installer to look nice, I can completely understand. Yes, by all means, while installing, put surfing teenagers all over the screen if you want. But once the installation is finished, those teenagers should remain in the installer package and go into the trash when I delete the installer. I don't want them surfing around in the receipt folder, never to be seen again but taking up space anyway, in many languages in many different update receipts.

A receipt tells the computer which files were installed, where they are, what privileges they are supposed to have, what optional installs were selected, etc. Everything else should not be there. Is there any application or system component that will ever open those readme files again?

Jun 5, 2006 5:28 AM in response to Mark Jones

That seems to be everyone's solution, "Get a bigger Hard Drive". Hardly an excuse for filling the receipts folder with useless never referred to again stuff. While I appreciate much of the info there is necessary for the "It Just Works" to work, I am convinced the files/packages are bloated and do not need to be nearly the size they are. Just because the space is there, we do not HAVE to fill it.

Jun 5, 2006 5:31 AM in response to Mark Jones

Additionally, what about Joe Public who never reads these discussions and thinks, "ah, I can get rid of all those unwanted old receipts" and deletes them all?

Had I not figured out a few years back what they were for, I would have been inclined to delete them all to free up space thinking they would receipts and therefore optional to retain. They are, of course, not very optional. You need most of them retaIned.

Jun 5, 2006 8:57 AM in response to Michel Colman

What I don't understand is: what's all this
stuff doing in a receipt?


As I said, don't consider these file packages only as installer receipts but as the OS's repository for just about any resources relating to the installation that isn't part of the installed app itself. Resources are available assets that may be used for various purposes, not all of them defined beforehand. (A bank account is an example of such a resource.) I can't tell you exactly what Apple had in mind for some of the files in these packages or which ones are safe to delete, since that might depend in part on things yet to be developed or needed only for special purposes you may never encounter.

Like with anything else the OS normally maintains, you modify or delete them yourself at your own risk, since doing so may or may not break some process you don't understand or are aware of.

And then don't get me started about XML 😉
The information whether or not the computer
needs to be restarted, could be encoded in 1 bit.


Sure, but how many bytes of supporting code would it take to reliably extract that one bit of info from an arbitrary file structure for use with any app that required something from it? Would you prefer that every app that might possibly want access to any of the file's info individually maintain its own private routines & tables to understand, parse, & validate the file's content? What a nightmare that would be: every time such a file's organization changed, every app that used it would have to be revised to maintain its functionality & reliability. And the code bloat would be enormous, even if every app developer stayed on top of the changes.

XML is HTML on steroids. HTML defines a limited number of tags that encode how content can be displayed, but encode nothing about the information that content represents. As a result, that info can't reliably be extracted to be used for other than display purposes without human help. XML doesn't define specific info tags, it defines a systematic method of defining & creating them. As a result, any information can be made available in a form that machines or humans can use reliably for whatever purpose is desired.

Does this increase file size? You better believe it! Not only must you consider the size of the tagged file itself but of the defining reference & other documents that support it. But consider that this enables many platforms running many languages to parse, display, edit, exchange, and validate XML documents.

This is, as one Mr. Jobs might say, an insanely great thing. Instead of being limited to exchanging bits that mean nothing outside of a very specific & limited context that must be defined individually for every use, platform, & programming language, our computers can now exchange information in much the same way humans can, knowing (for example) what the bit representing 'restart required' means in any context that would be useful.

Jun 5, 2006 9:21 AM in response to R C-R

I'm not even too worried about XML taking up space. Although it's not strictly necessary, I agree it's a very versatile way of encoding information. I'm sure it's a waste (contrary to what you say, reading a specific bit inside an open file in memory actually takes two assembler instructions while calling a system function to look for a specific XML-tag takes more instructions in the application, plus the full tag has to be in the data section as a string, but let's not go there...) but I can live with that.

It's not the XML files that are taking up all the space. There's only a few of them in each receipt, and they are not that big. Most of the big files inside the receipts are readme's, pictures, applications, etc.

And like you, I have no idea what Apple ever intends to do with them. I can see no useful function for them at all.

Jun 5, 2006 1:43 PM in response to Michel Colman

I have no idea what Apple ever intends to do with them. I can see no useful function for them at all.

Then, by all means, delete them. It's your machine and you can do anything you wish with it. If that action hoses it up, then you'll have to live with the consequences. If you have a better way, consider developing your own operating system and joining the millionaires club.

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.

Ridiculous receipts

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