Skip to main content

How to Copy Data from an Old User Account to a New User on macOS

Updated over 2 weeks ago

When a macOS device is reassigned or a user account is recreated, you may need to migrate files from an old user account to a new one. This guide walks through a safe and reliable method using Terminal.

This approach is commonly used when:

  • An employee leaves and a new local account is created

  • A user account becomes corrupted

  • You want a clean account but keep existing data


Requirements

  • macOS device

  • Access to the new user account

  • The new user’s password (required for sudo)

  • Terminal access


Step 1: Log in to the New User Account

Log in to the new macOS user account where the data will be copied into.

All commands in this guide should be run from the new user’s session.


Step 2: List Existing User Accounts

Open Terminal and list all user folders:

sudo ls /Users

When prompted:

  • Enter the new user’s password

This command helps you confirm the exact username of the old account (for example: olduser).


Step 3: Copy Files from the Old User to the New User

You can now copy important folders such as Desktop, Documents, Repositories, or others.

Example: Copy Desktop

sudo rsync -a --progress /Users/<olduser>/Desktop/ ~/Desktop/

Example: Copy Documents

sudo rsync -a --progress /Users/<olduser>/Documents/ ~/Documents/

Replace <olduser> with the actual old username.

Common folders you may want to copy

  • Desktop

  • Documents

  • Downloads

  • Projects / Repos

  • Pictures

💡 rsync is recommended because it:

  • Preserves file structure

  • Shows progress

  • Avoids partial copy issues


Step 4: Fix File Ownership (Important)

After copying files with sudo, the files may still belong to the old user.
You must update ownership so the new user can access and modify them.

Run:

sudo chown -R <newuser>:staff ~/Desktop ~/Documents

Replace <newuser> with the new account’s username.

If you copied additional folders, include them in the command as well.


Step 5: Verify Access

  • Open Finder

  • Navigate to Desktop and Documents

  • Confirm files open, edit, and save correctly

Once confirmed, the data migration is complete.


Optional: Clean Up Old User Account

After verifying that all required data has been copied and backed up:

  • You may remove the old user account from System Settings → Users & Groups

  • Or keep it temporarily for audit or recovery purposes


Best Practices

  • Always copy data before deleting the old user account

  • Use rsync instead of drag-and-drop for reliability

  • Fix file ownership after using sudo

  • Test access before handing the device to the user


Summary

This method provides a safe, controlled way to migrate user data on macOS without relying on Migration Assistant or backups. It is especially useful in managed or enterprise environments.

If you need help performing this on managed devices, contact your administrator or Swif Support.

Did this answer your question?