🧹 chore: Prune Dangling Images After deployed-update Pull (#14269)

This commit is contained in:
Danny Avila 2026-07-14 18:02:38 -04:00 committed by GitHub
parent c865de99a5
commit 481e2a9257
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);