From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Is there a command to auto-purge old eln-cache files? Date: Sat, 25 Jun 2022 08:28:19 +0300 Message-ID: <83zgi1b9cc.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24208"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 25 07:31:33 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4yOL-0006BL-M6 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 25 Jun 2022 07:31:33 +0200 Original-Received: from localhost ([::1]:56342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4yOK-0000MI-H5 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 25 Jun 2022 01:31:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4yLJ-0000Lb-Py for help-gnu-emacs@gnu.org; Sat, 25 Jun 2022 01:28:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4yLJ-000379-2f for help-gnu-emacs@gnu.org; Sat, 25 Jun 2022 01:28:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=R6dnp7+1YNcd5k1TJVAOCuVg1fSnEmJ0FTbYnwIOEAg=; b=j/cswyvzI+1V gsQhJ0bmx/jJVqGfEtITt6nVzUoi0uP6LSyxUmDi1KeglgfpqRJxOnXbJSxuC98Njg9ngA9neCumH zD1EK5ZfeLVSQ9G6IcRjwYKp2NQvua4BW7U8q1PFnAfXmWTtqMGazxfwRUgq8lQgPVfM21ZNRLDRu 2uh6PTPlKWC6duyKMosL6wwg6uaiISL8YmTthAQpah+olN4ViyHvWeu99lwh4zsbE1Lmkzmy2SJhG 9mDkvbGfKj/R/ngCOIJTL3oFfC8mESlFIQ1yUniiPc+tsAImsjbZroh+cq3Kfr1CFx2AI0NSGiDqD kUANg7jDkc2O7P7YLsZEng==; Original-Received: from [87.69.77.57] (port=2300 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4yLI-0003Qp-HU for help-gnu-emacs@gnu.org; Sat, 25 Jun 2022 01:28:24 -0400 In-Reply-To: (message from Kaushal Modi on Fri, 24 Jun 2022 16:33:58 -0400) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138086 Archived-At: > From: Kaushal Modi > Date: Fri, 24 Jun 2022 16:33:58 -0400 > > I routinely update my emacs build from git and over time, and so I > collect hundreds of MBs of eln-cache files. Just looking at the > eln-cache dir names, it's not very evident which one is the latest one > (especially, from a tool call ncdu, I cannot tell which directories > should be safe to delete). If you keep only one Emacs executable for all those builds, and either delete the old ones or don't care whether they remain usable, then you can identify the only subdirectory under the eln-cache directory you need to keep by one of the following methods: . sort the directories under ~/.emacs.d/eln-cache by date, and leave only the one whose time stamp is the latest . ask Emacs: "M-: comp-native-version-dir RET" -- you can delete all the subdirectory of eln-cache except the one whose name that produces > So that made me wonder if there's already an emacs-lisp function to > purge old eln caches, and I am not aware? Define "old" for this purpose. E.g., I keep many old Emacs executables (it makes it easier to bisect bugs), so for me "old" means "belonging to an Emacs executable I removed".