Rixstep
 About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Home » Products » Reviews » The Very Ugly » Clean Caches 1.3

Clean Caches 1.3

Every letter of the alphabet: that's how this gem finds the straightest path from A to B - from A through C, then D, then E, then F, then G...


SISU Works (Jeremy Matthews)
Rating: (four burnt disintegrating toasts)

566 Saddell Bay Loop
Ocoee, Florida 34761
US


Collateral damage:
Someone's got your admin password
Possible (probable) risk of system damage
Neurological symptoms reminiscent of Alzheimers

What's the straightest path from A to B? If you ask these certified (certifiable) Apple support engineers, they'd probably tell you it's from A to C to D to E to F to G... to Z to B. At least that's the impression given by a dissection of Clean Caches 1.3. At time of writing, 502 people have already succumbed to the temptation and an unknown number of OS X systems have been hurt as a result.

You just don't do a sightseeing tour of an alphabet like that.

One — The Application Domain

As stated in at least two dozen different places in this gem, the purpose of this 'software' is as follows.

<dict>
    <key>IFPkgDescriptionDescription</key>
    <string>THIS SOFTWARE IS PROVIDED "AS-IS" AND FREE OF CHARGE,
    WITH ABSOLUTELY NO WARRANTY OR SUPPORT OF ANY KIND, EXPRESSED
    OR IMPLIED, UNDER THE TERMS OF THE INCLUDED LICENSE AGREEMENT.

    Install this software at your own risk..


    This program runs the command

    sudo rm -rf /Library/Caches/*
    sudo rm -rf /System/Library/Caches/*
    sudo rm -rf ~/Library/Caches/*

    That's it....its just in a package to make life easier.

    Thanks,
    SISU Works</string>
        <key>IFPkgDescriptionTitle</key>
        <string>ClearCachesBySW</string>
</dict>

So we're going to clean caches. How grand. As pointed out elsewhere in this voluminous package, all of the above can be compressed into a single command line.

sudo rm -fr /Library/Caches/* /System/Library/Caches/* ~/Library/Caches/*

So all you have to do is copy that line to the clipboard, drop down to a command line, paste it in, hit Enter, submit your password when prompted, and reboot. [It's very important to immediately reboot.]

And in fact CLIX has had this command since time immemorial. It's been called 'Clean Caches (!)'. There's been an exclamation point because the command description has important information and anyone doing this should be careful.

So anyway that's the application domain - how then do we go about it?

Two — The Implementation

So how are we going to go about automating this obliteration of caches? Perhaps a word first about why you'd want to.

The OS X cache system is - in a word - 'excellent'. You can't do everything with a cache system; you can only hope to 'keep up'.

The caches record a lot of things - for example, where all applications on a system are found. It's very easy to get info from the program loader and update a cache, but it's not so easy to ruminate through an entire hard drive (or two or three) and look for orphans.

And there are other examples. The main thing is the caches can need to be cleaned from time to time. It's also important to understand that the system relies on these caches - and might not like running if some of its important files suddenly disappear.

Which is why such enterprises should be entered into only with extreme caution.

If you clean out all your caches, it's best to reboot at once. The system will do 'lazy writes' and restore a bit of these before the 'power-down', but that's OK unless you're really in a lot of trouble.

Whatever: running the system when its own files are suddenly yanked away is never going to be a good thing.

And now onto the implementation.

All Clean Caches really wants to do is run an extremely trivial Unix shell script (see above) but its 'modus operandi' will certainly go down in history as one of the most inventive and lugubrious - and totally wacky - ever conceived by a homo sapiens.

  1. Download the 'software'. It's only 9 KB (9453 bytes). The file name is 'Clean Caches By SW.dmg.zip'

  2. Unzip the package. You get a 1 MB DMG, 'Clean Caches By SW.dmg', inside a folder. Mount the DMG.

  3. The mount produces the following hive.
    % ls -alR CleanCachesBySW.pkg
    total 0
    drwxr-xr-x  3  102 Dec 12 16:28 .
    drwx------  7  238 Dec 15 16:30 ..
    drwxr-xr-x  7  238 Dec 15 16:27 Contents
    
    CleanCachesBySW.pkg/Contents:
    total 96
    drwxr-xr-x   7    238 Dec 15 16:27 .
    drwxr-xr-x   3    102 Dec 12 16:28 ..
    -r--r--r--   1  35046 Dec 15 16:21 Archive.bom
    -r--r--r--   1     85 Dec 15 16:21 Archive.pax.gz
    -r--r--r--   1   1318 Dec 15 16:21 Info.plist
    -r--r--r--   1      8 Dec 15 16:21 PkgInfo
    drwxr-xr-x  11    374 Dec 12 16:29 Resources
    
    CleanCachesBySW.pkg/Contents/Resources:
    total 72
    drwxr-xr-x  11   374 Dec 12 16:29 .
    drwxr-xr-x   7   238 Dec 15 16:27 ..
    -rwxr-xr-x   1  6148 Dec 15 16:21 .DS_Store
    -r--r--r--   1   190 Dec 15 16:21 BundleVersions.plist
    lrwxr-xr-x   1    14 Dec 12 16:29 CleanCachesBySW.bom -> ../Archive.bom
    lrwxr-xr-x   1    17 Dec 12 16:29 CleanCachesBySW.pax.gz -> ../Archive.pax.gz
    -rwxr-xr-x   1   189 Dec 15 16:21 CleanCachesBySW.post_install
    -r--r--r--   1    44 Dec 15 16:21 CleanCachesBySW.sizes
    drwxr-xr-x   6   204 Dec 12 16:29 English.lproj
    -r--r--r--   1    17 Dec 15 16:21 package_version
    -rwxr-xr-x   1   188 Dec 15 16:21 postinstall
    
    CleanCachesBySW.pkg/Contents/Resources/English.lproj:
    total 32
    drwxr-xr-x   6  204 Dec 12 16:29 .
    drwxr-xr-x  11  374 Dec 12 16:29 ..
    -r--r--r--   1  697 Dec 15 16:21 CleanCachesBySW.info
    -r--r--r--   1  753 Dec 15 16:21 Description.plist
    -r-xr-xr-x   1  719 Dec 15 16:21 License.rtf
    -r-xr-xr-x   1  748 Dec 15 16:21 ReadMe.rtf
    %

  4. There are two 'readmes'. The first, 'Readme.rtf', says:

    This program runs the command

    sudo rm -rf /Library/Caches/*\
    sudo rm -rf /System/Library/Caches/*\
    sudo rm -rf ~/Library/Caches/*\

    That's it....its just in a package to make life easier.

  5. The second readme, 'License.rtf', says:

    Install at your own risk...

    Please do not reverse-engineer or modify the included components.

  6. If you dare double-click the package, you're immediately prompted for your admin password - which you'd be sensible to not submit. So you go spelunking instead.

  7. You find two curious files inside the package. The first, 'postinstall', has the following contents.

    #!/bin/sh

    # Runs the unix command to clean out caches for the current user, System Library, and local Library

    sudo rm -rf /Library/Caches/* /System/Library/Caches/* ~/Library/Caches/*

  8. The second, 'CleanCachesBySW.post_install', is identical to the first but for the waste of extraneous white space. Clearly there are two routines which represent a single Unix shell script which are invoked at two different stages of the 'install' of this 'software'.

  9. The spelunking continues. Another file of immense interest is 'BundleVersions.plist'. It's a completely empty - and therefore completely irrelevant - dictionary file.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict/>
    </plist>

  10. Even the contents of 'CleanCachesBySW.sizes' is enlightening.

    NumFiles 0
    InstalledSize 0
    CompressedSize 0

  11. The file 'package_version' contains version information about Clean Caches 1.3.

    major: 1
    minor: 4

  12. The file 'Description.plist' once again tells the world what will supposedly transpire.
    <dict>
        <key>IFPkgDescriptionDescription</key>
        <string>THIS SOFTWARE IS PROVIDED "AS-IS" AND FREE OF CHARGE,
        WITH ABSOLUTELY NO WARRANTY OR SUPPORT OF ANY KIND, EXPRESSED
        OR IMPLIED, UNDER THE TERMS OF THE INCLUDED LICENSE AGREEMENT.
    
        Install this software at your own risk..
    
    
        This program runs the command
    
        sudo rm -rf /Library/Caches/*
        sudo rm -rf /System/Library/Caches/*
        sudo rm -rf ~/Library/Caches/*
    
        That's it....its just in a package to make life easier.
    
        Thanks,
        SISU Works</string>
            <key>IFPkgDescriptionTitle</key>
            <string>ClearCachesBySW</string>
    </dict>

  13. The file 'CleanCachesBySW.info' has all this stuff yet again - along with the key to prompting for an admin password.
    Title ClearCachesBySW
    Version
    Description THIS SOFTWARE IS PROVIDED "AS-IS" AND FREE OF CHARGE, WITH ABSOLUTELY
    NO WARRANTY OR SUPPORT OF ANY KIND, EXPRESSED OR IMPLIED, UNDER THE TERMS OF THE
    INCLUDED LICENSE AGREEMENT.
    
    Install this software at your own risk..
    
    
    This program runs the command
    
    sudo rm -rf /Library/Caches/*
    sudo rm -rf /System/Library/Caches/*
    sudo rm -rf ~/Library/Caches/*
    
    That's it....its just in a package to make life easier.
    
    Thanks,
    SISU Works
    DefaultLocation /
    DeleteWarning
    
    ### Package Flags
    
    NeedsAuthorization YES
    Required NO
    Relocatable NO
    RequiresReboot NO
    UseUserMask NO
    OverwritePermissions NO
    InstallFat NO
    RootVolumeOnly NO
    OnlyUpdateInstalledLanguages NO

  14. So the first inclination might be to change that 'YES' to a 'NO' and see what happens - but if you try it, you'll discover it's not quite enough. What you need to do is get into the 'Info.plist' file and do something about the following. [Removing it will be enough.]

    <key>IFPkgFlagAuthorizationAction</key>
    <string>RootAuthorization</string>

  15. But you should also first do something about this - or your precious software will go mucking about in areas you don't want it to go. [Put in the full path to your home directory instead.]

    <key>IFPkgFlagDefaultLocation</key>
    <string>/</string>

  16. Now you can run this 'software' - and for a glimpse of what happens, click the link below. Thank you for your patronage so far.

Three — The Movie

Click here to see the exciting continuation of this astounding saga. Click now!

About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Copyright © Rixstep. All rights reserved.