From 481e2a9257db9a866b58e3e488bdbf0125df1631 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 14 Jul 2026 18:02:38 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20Prune=20Dangling=20Imag?= =?UTF-8?q?es=20After=20deployed-update=20Pull=20(#14269)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/deployed-update.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/deployed-update.js b/config/deployed-update.js index 7ce6eb106d..57434e54bf 100644 --- a/config/deployed-update.js +++ b/config/deployed-update.js @@ -61,6 +61,15 @@ const shouldRebase = process.argv.includes('--rebase'); console.orange(pullCommand); execSync(pullCommand, { stdio: 'inherit' }); + /* The tag-removal above only covers the stock repositories; any overridden + * `api` image (or other freshly pulled service) leaves its previous version + * dangling — ~1.7GB per update that nothing reclaimed. Prune AFTER the pull + * so the just-superseded layers are already untagged, mirroring update.js. */ + console.purple('Removing all unused dangling Docker images...'); + const pruneCommand = 'sudo docker image prune -f'; + console.orange(pruneCommand); + execSync(pruneCommand, { stdio: 'inherit' }); + const startCommand = 'sudo docker compose -f ./deploy-compose.yml up -d'; console.green('Your LibreChat app is now up to date! Start the app with the following command:'); console.purple(startCommand);