Real Commands

Unlike every other removal guide on this site, these commands target software that actually exists on a shipping operating system. The aged daemon (PR #302) was merged on March 9, 2026 and is enabled by default in MidnightBSD.

What You're Removing

The complete aged subsystem consists of four components:

1. aged(8) daemon/usr/sbin/aged, SQLite database at /var/db/aged/aged.db, socket at /var/run/aged/aged.sock
2. agectl(8) CLI/usr/sbin/agectl
3. agev(3) library — Functions in libutil (agev_get_age_bracket, agev_set_age, agev_set_dob)
4. Age groupsage4p (GID 856), age13p (GID 857), age16p (GID 858), age18p (GID 859)

Step 1: Disable the Daemon

The aged daemon is enabled by default via rc.conf. Disable it and stop the running instance:

# Disable aged from starting at boot
sysrc aged_enable="NO"

# Stop the running daemon
service aged stop

sysrc writes to /etc/rc.conf. You can also edit the file directly and change aged_enable="YES" to aged_enable="NO".

Step 2: Remove the Database

The SQLite database stores all age data for all users on the system. Delete it:

# Remove the age database
rm /var/db/aged/aged.db

This permanently destroys all stored age and date-of-birth records. There is no recovery without a backup.

Step 3: Verify Socket Removal

The daemon's Unix domain socket should be removed automatically when the service stops. Verify:

# Confirm the socket is gone
ls -la /var/run/aged/aged.sock

If the socket still exists after stopping the service, remove it manually:

rm /var/run/aged/aged.sock

Step 4: Remove Age Group Memberships

PR #317 introduced four Unix groups that the daemon uses for package-level enforcement. Remove all users from these groups:

# List members of each age group
pw groupshow age4p
pw groupshow age13p
pw groupshow age16p
pw groupshow age18p

# Remove a specific user from all age groups
pw groupmod age4p -d USERNAME
pw groupmod age13p -d USERNAME
pw groupmod age16p -d USERNAME
pw groupmod age18p -d USERNAME

Repeat the pw groupmod -d commands for every user listed in the group membership output. Alternatively, to remove the groups entirely:

# Remove the age groups from the system (optional)
pw groupdel age4p
pw groupdel age13p
pw groupdel age16p
pw groupdel age18p

mport dependency

If the mport package manager has been updated to check age group membership, deleting the groups may cause mport to refuse to install age-gated packages. If you want those packages to install regardless, you may prefer to keep the groups but add all users to all four of them.

Step 5: Verify

Confirm the removal is complete:

# Daemon should not be running
ps aux | grep aged

# Socket should not exist
ls /var/run/aged/

# Database should not exist
ls /var/db/aged/

# rc.conf should show NO
sysrc aged_enable

Expected output: no aged process, no socket file, no database file, aged_enable: NO.

Limitations

become-ageless.sh does not support BSD

The Ageless Linux conversion script targets Debian-based Linux systems. It uses apt, systemctl, and os-release — none of which exist on MidnightBSD. The steps above are manual. A BSD-targeted script may be developed if demand warrants it.

agev(3) remains in libutil

The agev_get_age_bracket(), agev_set_age(), and agev_set_dob() functions are compiled into libutil. Removing them requires recompiling the base system. Disabling the daemon is sufficient to make these functions non-functional — they will fail to connect to the socket and return errors.

Alternative: Short-Circuit

If you prefer to keep the daemon's socket active (so applications that query it do not receive connection errors), see the short-circuit guide:

aged Stub Guide aged Technical Docs