Okay, here is a single command to perform those actions in Manjaro, keeping in mind the lack of reflector and using pacman-mirrors instead, and then addressing your question about making Manjaro more like Arch.
The Command:
sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syu && pamac upgrade --aur
Explanation of the command:
-
sudo pacman-mirrors --fasttrack 5:
sudo: Executes the command with root privileges, which is necessary to modify the system's mirror list file (/etc/pacman.d/mirrorlist).
pacman-mirrors: This is the Manjaro-specific tool for managing Pacman mirrors. Unlike Arch which often uses reflector, Manjaro provides pacman-mirrors out-of-the-box.
--fasttrack 5: This option tells pacman-mirrors to find the fastest 5 mirrors that are currently synchronized. This effectively updates your mirror list and sorts the fastest, most up-to-date mirrors to the top of your /etc/pacman.d/mirrorlist. You can adjust 5 to a different number if you prefer more or fewer mirrors. Other useful options include --country <CountryName> or --continent <ContinentName>.
-
&&: This is a shell operator that means "execute the next command only if the previous command was successful (exited with status 0)". This ensures that the system upgrade only starts if the mirror list was successfully updated.
-
sudo pacman -Syu:
sudo: Executes the command with root privileges.
pacman: The standard package manager for Arch-based distributions like Manjaro.
-Syu: The common flags for a full system upgrade:
-S: Synchronizes package databases.
-y: Downloads the latest copy of the master package lists from the repositories (syncs the databases). This is required after updating mirrors.
-u: Upgrades all currently installed packages that have newer versions available in the synchronized databases.
- IMPORTANT: This step handles packages from the official Manjaro repositories. You must review the output of this command carefully, especially for potential conflicts, package removals, or prompts about replacing files (
.pacnew files are crucial). Do not just hit 'Y' blindly.
-
&&: Again, ensures the next command runs only if the pacman upgrade was successful.
-
pamac upgrade --aur:
pamac: Manjaro's graphical and command-line package manager, which integrates support for the AUR.
upgrade: Tells pamac to perform an upgrade.
--aur: This specific flag tells pamac to check for and upgrade packages installed from the Arch User Repository (AUR).
- Note:
pamac typically runs as your user and will prompt for your sudo password when it's time to install the built AUR packages system-wide.
Important Considerations/Warnings:
- Review Output: As mentioned, a full system upgrade (
pacman -Syu) requires you to carefully review the output. There might be important messages, questions about removing conflicting packages, or notes about .pacnew files. Ignoring these can break your system.
- AUR Build Failures:
pamac upgrade --aur might fail if AUR packages have dependencies that aren't met, if the build process itself fails (often due to changes in dependencies or source code), or if there are split-package issues. You'll need to address these manually if they occur.
- Time: This process can take a significant amount of time depending on your internet speed and the number of packages to upgrade.
Can you make your Manjaro a bit more cutting edge like pure Arch?
Technically, yes, but practically and safely, no.
Here's why:
- Manjaro's Philosophy: Manjaro deliberately holds back packages from the Arch repositories for a testing period. This is its core feature – providing a more stable experience than Arch by letting the Arch community find and report critical bugs first.
- Manjaro's Repositories: Manjaro uses its own set of repositories (
core, extra, community, etc.), which are snapshots of the Arch repos after they've gone through Manjaro's testing branch.
- Manjaro-Specific Tools: Manjaro has tools like
pacman-mirrors, manjaro-settings-manager, and configurations that are built around its own package versions and repository structure.
What happens if you try to point Manjaro to Arch repos?
If you edit your /etc/pacman.conf to use Arch Linux repositories instead of Manjaro's, you will inevitably encounter:
- Dependency Hell: Manjaro packages often depend on slightly older versions of libraries or other packages than what is currently in Arch's repos.
- File Conflicts: Manjaro might ship configuration files or packages with the same name as Arch, but with different content or structures, leading to installation conflicts.
- Broken Manjaro Tools: Manjaro's own tools and utilities are designed to work with Manjaro's package versions. They will likely break or behave unexpectedly when run against Arch's newer packages.
Attempting this will essentially turn your Manjaro installation into a broken, unsupported hybrid system that is likely to become unstable or unbootable with the next update.
Conclusion:
If you want the bleeding edge experience of Arch Linux, the recommended and supported way is to install Arch Linux itself. Manjaro is designed to be a user-friendly, slightly delayed derivative of Arch. While you can use tools like pamac to access the AUR (which is part of the Arch ecosystem), you should not try to directly pull packages from the main Arch repositories into a Manjaro installation.