macOS上软件安装/更新时间的获取


=Start=

缘由:

前一篇文章整理了macOS上软件安装列表的获取方法,这里再整理一下macOS上软件安装/更新时间的获取方法,方便有需要的时候参考。

正文:

参考解答:
  1. 获取系统软件(Xcode/Safari/macOS/…)的安装版本和时间
/* softwareupdate – system software update tool */

softwareupdate --history
softwareupdate --history --all
  1. 获取所有软件的安装版本和时间

GUI操作:

 -> 关于本机 -> 系统报告 -> 软件 -> 安装
About This Mac > Overview > System Report > Software > Installations

命令行操作:

system_profiler SPInstallHistoryDataType
cat /Library/Receipts/InstallHistory.plist | less
cat /private/var/log/install.log | less

补充:macOS的 system_profiler 命令说明

$ man system_profiler

system_profiler – reports system hardware and software configuration.
用于输出关于系统硬件和软件及配置信息的报告
#  -> 关于本机 -> 系统报告 里的所有内容都可以通过 system_profiler 命令获取
# 出于速度和效率考虑,使用时最好指定要查看的数据类型(DataType)
$ system_profiler -listDataTypes
Available Datatypes:
SPParallelATADataType
SPUniversalAccessDataType
SPSecureElementDataType
SPApplicationsDataType #软件-应用程序
SPAudioDataType
SPBluetoothDataType
SPCameraDataType
SPCardReaderDataType
SPiBridgeDataType
SPDeveloperToolsDataType
SPDiagnosticsDataType
SPDisabledSoftwareDataType #软件-已停用软件
SPDiscBurningDataType
SPEthernetDataType
SPExtensionsDataType
SPFibreChannelDataType
SPFireWireDataType
SPFirewallDataType #网络-防火墙
SPFontsDataType
SPFrameworksDataType
SPDisplaysDataType #硬件-图形卡/显示器
SPHardwareDataType #硬件-硬件概览(包含系统序列号/硬件uuid等信息)
SPInstallHistoryDataType #软件-安装
SPInternationalDataType
SPLegacySoftwareDataType #软件-旧版软件
SPNetworkLocationDataType #网络-位置
SPLogsDataType
SPManagedClientDataType
SPMemoryDataType #硬件-内存
SPNVMeDataType
SPNetworkDataType
SPPCIDataType
SPParallelSCSIDataType
SPPowerDataType
SPPrefPaneDataType
SPPrintersSoftwareDataType
SPPrintersDataType
SPConfigurationProfileDataType #软件-描述文件
SPRawCameraDataType
SPSASDataType
SPSerialATADataType
SPSPIDataType
SPSmartCardsDataType
SPSoftwareDataType #软件-系统软件概览
SPStartupItemDataType #软件-启动项
SPStorageDataType #硬件-存储
SPSyncServicesDataType
SPThunderboltDataType
SPUSBDataType #硬件-USB
SPNetworkVolumeDataType
SPWWANDataType
SPAirPortDataType #网络-Wi-Fi
参考链接:

如何列出macOS系统上所有的更新记录(How to List All Updates on macOS)
https://appuals.com/all-updates-on-macos/

How to check a Mac’s OS upgrade history in System Profiler
https://www.macworld.com/article/234916/how-to-check-a-macs-os-upgrade-history-in-system-profiler.html

Check What Software Updates Have Been Installed in Mac OS X
https://osxdaily.com/2011/10/25/check-what-software-updates-have-been-installed-in-mac-os-x/

macOS: How to Display All Previously Installed Security Updates
https://www.macobserver.com/tips/quick-tip/macos-display-installed-security-updates/

How to view Software Update history?
https://apple.stackexchange.com/questions/104989/how-to-view-software-update-history

=END=


《 “macOS上软件安装/更新时间的获取” 》 有 5 条评论

  1. 在 Mac 上的“控制台”中查看报告
    https://support.apple.com/zh-cn/guide/console/cnsl664be99a/mac
    `
    “控制台”编译各种报告,可提供一般诊断数据以及与电脑操作系统和 App 相关的详细信息。您可以从边栏访问以下报告:
    * 崩溃报告:有关 App 或进程崩溃的系统和用户报告。崩溃报告的扩展名为 .ips。
    * Spin 报告:有关 App 或进程问题的系统和用户详细报告。Spin 报告的扩展名为 .spin。
    * 日志报告:有关系统或特定 App 处理时所产生的活动信息的系统和用户报告。日志报告的扩展名为 .log、._log 或 .its 等。
    * 诊断报告:有关硬件资源、系统响应时间等信息的系统和用户报告。诊断报告的扩展名为 .diag 或 .dpsub 等。
    * Mac 分析数据:Message Tracer Store 的数据内容位于“/var/log/DiagnosticMessages”。
    * system.log:旧版系统的日志文件内容位于“/private/var/log/system.log”。

    用户报告来源于当前用户使用的 App。系统报告来源于影响所有用户的操作系统组件。如果以管理员用户的身份登录,您可以查看所有报告。如果不是以管理员身份登录,则只能查看用户报告。

    # 一般日志都在这个目录下
    # ls -lt /private/var/log/
    `

  2. Support Tip: Install Rosetta 2 on new Apple Silicon (M1) Macs to run apps built for Intel Macs
    https://techcommunity.microsoft.com/t5/intune-customer-success/support-tip-install-rosetta-2-on-new-apple-silicon-m1-macs-to/ba-p/2087631
    `
    在Apple M1/M2 芯片的macOS上安装 Rosetta 2 以正常运行基于 Intel 芯片编译的应用

    Install Rosetta 2 on Apple Silicon Macs to ensure app compatibility with Intel-based apps using one of the following steps:

    Recommend users to install Rosetta 2 manually by launching any installed Intel-based app on the Apple Silicon Mac.

    Recommend users to open Terminal and run the following command or provide a script that runs this command to users:

    /usr/sbin/softwareupdate –install-rosetta #(root permission not required)
    /usr/sbin/softwareupdate –install-rosetta –agree-to-license #(root permission required)
    `

    Installing Rosetta 2 on Apple Silicon Macs
    https://derflounder.wordpress.com/2020/11/17/installing-rosetta-2-on-apple-silicon-macs/

    Rosetta 2 enables a Mac with Apple silicon to use apps built for a Mac with an Intel processor.
    https://support.apple.com/en-us/HT211861

  3. macOS, the command line developer tool missing after updated to Monterey 12.6
    https://superuser.com/questions/1742439/macos-the-command-line-developer-tool-missing-after-updated-to-monterey-12-6
    `
    2022-09-15 20:22:42.395 xcodebuild[13337:71264] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDESimulatorAvailability (/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin), error = Error Domain=NSCocoaErrorDomain Code=3588 “dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0109): Symbol not found: (_OBJC_CLASS_$_SimDiskImage)

    Details: Failed to load code for plug-in com.apple.dt.IDESimulatorAvailability (/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin)

    Please ensure Xcode packages are up-to-date — try running ‘xcodebuild -runFirstLaunch’.

    # 谜底藏在谜面中的一个例子
    刚升级到 macOS Monterey 12.6 后,发现命令行上执行很多命令都会提示 xcodebuild 中,然后运行巨慢,想执行一下 git 命令还提示我 git 没有安装,按照它的提示安装之后还是不行,还报错,但是没有细看报错日志,而是跑网上去找,谁成想苹果已经把解决办法写在了错误日志提示里面,只是我没有好好的去看,还好近期也有网友有类似问题并发出了解决办法,要不然还不知道什么时候才能解决。
    xcodebuild -runFirstLaunch
    `

  4. 如何删除macOS启动台里无用的图标
    “`
    sudo find /private/var/folders -iname “com.apple.dock.launchpad” 2>/dev/null

    $ cd $(sudo find /private/var/folders -iname “com.apple.dock.launchpad” 2>/dev/null)

    $ sqlite3 db/db

    sqlite> .headers on
    sqlite> .schema apps
    CREATE TABLE apps (item_id INTEGER PRIMARY KEY, title VARCHAR, bundleid VARCHAR, storeid VARCHAR,category_id INTEGER, moddate REAL, bookmark BLOB);
    sqlite> select * from apps limit 3;
    sqlite> select count(1) from apps;

    sqlite> delete from apps where item_id=162;
    sqlite> delete from apps where bundleid=’com.sublimetext.4′;

    sqlite> .quit

    $ killall Dock
    “`

    mac强制删除启动台的图标
    https://blog.csdn.net/weixin_48300785/article/details/120740513

    MAC如何删除启动台无用图标
    https://jingyan.baidu.com/article/d45ad148ab0a8228552b80c4.html

    删除mac启动台里删不掉的图标
    https://www.jianshu.com/p/5527fcf58c23

  5. 确定你的 Mac 使用的是哪个 macOS 版本
    https://support.apple.com/zh-cn/HT201260
    `
    macOS 最新版本
    macOS Ventura 13.2.1
    macOS Monterey 12.6.3
    macOS Big Sur 11.7.4
    macOS Catalina 10.15.7
    macOS Mojave 10.14.6
    macOS High Sierra 10.13.6
    macOS Sierra 10.12.6

    OS X El Capitan 10.11.6
    OS X Yosemite 10.10.5
    OS X Mavericks 10.9.5
    OS X Mountain Lion 10.8.5
    OS X Lion 10.7.5

    Mac OS X Snow Leopard 10.6.8
    Mac OS X Leopard 10.5.8
    Mac OS X Tiger 10.4.11
    Mac OS X Panther 10.3.9
    Mac OS X Jaguar 10.2.8
    Mac OS X Puma 10.1.5
    Mac OS X Cheetah 10.0.4

    发布日期: 2023 年 02 月 23 日
    `

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注