Skip to content

emaint

Practical emaint cheat sheet covering repository sync, world and merge consistency checks, log cleanup, binhost validation, Gentoo news maintenance, and safe Portage hygiene operations


Run all maintenance checks

emaint all

Pretend mode (no changes)

emaint -p all

Verbose output

emaint -v all

Quiet mode (scripting)

emaint -q all

Repository

Sync all repositories

emaint sync

Check repository metadata

emaint repo check

Fix repository issues

emaint repo fix

World File

Check world file consistency

emaint world

Pretend world file fixes

emaint -p world

Merges

Clean up failed or stuck merges

emaint merges

Pretend merge cleanup

emaint -p merges

Logs

Check log directory

emaint logs check

Clean old Portage logs

emaint logs clean

Binhost

Check binary package repository

emaint binhost check

Clean broken binary packages

emaint binhost clean

Gentoo News

Check Gentoo news state

emaint news check

Fix Gentoo news database

emaint news fix

Sync (Granular)

Sync main Gentoo repository only

emaint sync --repo gentoo

Pretend repository sync

emaint -p sync

Combined Maintenance

Full maintenance run (recommended)

emaint sync
emaint all

Safe maintenance for cron jobs

emaint -q sync && emaint -q all

Exit Codes

Check exit status

emaint all
echo $?
  • 0 — success
  • 1 — non-fatal issues detected
  • 2 — fatal error