Home Manjaro How to update Manjaro using command line in the Terminal

How to update Manjaro using command line in the Terminal

Discover how to update Manjaro Linux through the command line in this easy-to-follow guide. Covering the essential commands and tips, you'll learn to efficiently manage system updates, ensuring your Manjaro installation remains secure, stable, and equipped with the latest features and improvements.

by Kiran Kumar
Published: Updated:
Update manjaro using command line

By default settings, Manjaro connects to the internet and shows a notification that updates are available to download on the status bar. You have the option to confirm and go ahead to update your system. It is the graphical user interface way.

On the other hand, if you wish to go to the Terminal and perform the update by command line, here is the guide for you. It is especially useful if you are updating a Manjaro PC by remote login.

Synchronizing and updating the system

Updating Manjaro using command-line is done in two ways:

Syu command: System Update will update the system with the latest updates. It is enough for most of the general scenarios when the system is working well with no corrupt database.

Syyu command: Syyu command is used to help pacman locate and download the packages for installation with forced database update.

-yy flags will force the refresh of all package lists and rebuild everything. It is especially great for fixing a corrupted database. The command synchronizes your Manjaro database with the Manjaro official repositories and updates your system. It will rebuild the system repo database info completely.

Updating Manjaro XFCE from the Terminal

Step 1) Click on the Manjaro icon on the taskbar and look for “Terminal.”

Step 2) Launch “Terminal Emulator.”

Launching Terminal in Manjaro XFCE

Launching Terminal in Manjaro XFCE

Step 3) Use the pacman system update command to update the system. Pacman is the Manjaro’s default package manager used to install, upgrade, configure and remove software. Use it with sudo.

sudo pacman -Syu

OR

sudo pacman -Syyu

Step 3) Pay attention to the progress of the Terminal and enter ‘Y’ when needed. You should see it multiple numbers of times.

Terminal - Performing System Update

Terminal – Performing System Update

Monitor the progress to finish: You’ll see a progress bar for each package being downloaded and installed.

Updating Manjaro GNOME from the Terminal

Step 1) Launch ‘Terminal’.

Launching Terminal in Manjaro GNOME

Launching Terminal in Manjaro GNOME

Step 2) Use the pacman Syyu command to update the system. Pacman is the Manjaro’s default package manager used to install, upgrade, configure and remove software. Use it with sudo.

sudo pacman -Syu

OR

sudo pacman -Syyu

Step 3) Pay attention to the progress of the Terminal and enter ‘Y’ when needed. You should see it multiple numbers of times.

Update Manjaro GNOME via Terminal

Update Manjaro GNOME via Terminal

Post-update steps

After updating, it’s a good practice to reboot your system, especially if there were kernel or driver updates. This ensures that all new changes are correctly applied.

Additional tips

  • Check for orphaned packages: After updating, you can remove orphaned packages (packages that were installed as dependencies but are no longer needed) with sudo pacman -Rns $(pacman -Qdtq).
  • Use a mirror closer to you: For faster downloads, you can update your mirror list to use servers closer to your geographical location.

Dealing with errors

Sometimes, you might encounter errors during the update process. Common issues include keyring errors, package conflicts, or network problems. Here’s how to address them:

  1. Keyring errors: Refresh the keyring with sudo pacman-key --refresh-keys.
  2. Package conflicts: Follow the on-screen instructions to uninstall conflicting packages, if safe to do so.
  3. Network problems: Check your internet connection and try again.

FAQ: Navigating Manjaro updates with ease

In this section, I’ll address some frequently asked questions about updating Manjaro via the command line. These are based on common queries I’ve encountered and some of my personal experiences with Manjaro updates.


1. Is it safe to update Manjaro via the command line?

Absolutely! Updating Manjaro through the command line is not only safe but recommended for a more direct and informative experience. It allows you to see exactly what’s being updated and gives you more control over the process.


2. How often should I update Manjaro?

Manjaro is a rolling release distribution, meaning updates are continuous. I generally recommend checking for updates at least once a week. This helps in keeping your system secure and up-to-date with the latest features and bug fixes.


3. What should I do if an update takes too long?

Patience is key. Some updates, especially those involving the kernel or major system components, can take a significant amount of time. However, if an update seems unusually slow, check your internet connection. If everything seems fine but it’s still slow, it might be due to the server you’re downloading from. Consider updating your mirror list to use faster servers.


4. Can I use the system while it’s being updated?

Yes, you can generally use your system during most of the update process. However, I advise against running resource-intensive applications or restarting the system while updates are being installed. Once the update is complete, a system restart is a good practice.


5. What if I encounter a message about a ‘locked database’ during updates?

This usually means that another instance of pacman (the package manager) is running or that a previous update process was interrupted. You can often resolve this by removing the lock file with sudo rm /var/lib/pacman/db.lck. However, be cautious and make sure no other updates are running before doing this.


6. How can I revert an update if something goes wrong?

Reverting an update in Manjaro can be complex, but it’s usually possible. You can downgrade specific packages using the downgrade utility or restore from a backup if you’ve set up system snapshots (highly recommended). It’s a good idea to regularly back up your system to handle such scenarios.


7. Are there any GUI alternatives if I’m not comfortable with the command line?

Certainly! If you prefer a graphical interface, Manjaro offers a user-friendly update manager that you can use for the same purposes. It’s a great alternative for those who are not yet comfortable with the command line.


Conclusion

Updating Manjaro using the command line is a straightforward, efficient, and rewarding process that offers users deeper insight and control over their system’s maintenance. From the initial steps of checking for updates to resolving potential errors and understanding the importance of regular updates, this guide has aimed to demystify the process, making it accessible even for those new to Linux.

You may also like

19 comments

dani December 5, 2018 - 9:46 AM

Thank you very much.
It help me a lot.
I don’t know why octopi fails to update my Manjaro kde, but pacman has worked fine.
Thanks again!

Reply
Mar December 25, 2018 - 3:29 AM

Nice and clear instruction. To improve it further I think one should explain all the commands when telling someone to type in sudo -commands. What does the -Syyu do in this context?

Reply
Daniell June 19, 2019 - 3:55 AM

My understanding is that It’s the same as ‘Syu’, it’s a contraction of ‘Syyu’, the second ‘y’ is redundant.

Reply
Kristy December 22, 2022 - 1:36 AM

Your comment was useless. Maybe try being a bit more help?

Reply
kd October 1, 2019 - 4:19 AM

Synchronizing and Updating the System

Updating Manjaro using command-line is done in two ways:

Syu command: System Update will update the system with the latest updates. It is enough for most of the general scenarios when the system is working well with no corrupt database.

Syyu command: Syyu command is used to help pacman locate and download the packages for installation with forced database update.

-yy flags will force the refresh of all package lists and rebuild everything. It is especially great for fixing a corrupted database. The command synchronizes your Manjaro database with the Manjaro official repositories and updates your system. It will rebuild the system repo database info completely.

Reply
VOLVIC March 16, 2019 - 3:30 AM

Thank you
LOVE all your tutorials and your site

many thanks man

Reply
oguz March 20, 2019 - 7:13 AM

Hello, I use Manjaro KDE my 5 years old laptop.
I issue these commands and get 3 messages
Replace geoclue2 with extra/geoclue?
Replace libsystemd with core/systemd-libs?
Replace xorg-mkfontdir with extra/xorg-mkfontscale?
I said Y for 3 without a clue what are these , after insallation I have this hang on shutdown problem.

https://www.reddit.com/r/ManjaroLinux/comments/9vuzeb/kernel_419_causes_laptop_to_hang_on_shutdown/

What should I do?

Reply
patience July 26, 2019 - 4:06 AM

Stop mindlessly following and doing whatever is being suggested in the internet. Especially when it’s about Linux. Do some background research on the matters. And might not be bad idea in the future inquire about the matter in Manjaro-forums.

Reply
MrBungle August 17, 2019 - 9:00 AM

Wow, tact much? As you’re learning you make mistakes. While what you said is the correct answer, you don’t need to sound like a di*k that came out of the womb with all of your knowledge. You had to learn too. If you didn’t then you are an a** for not being the richest man in the world with all of your vast genius. People like you are what turn people off from asking question and hinder learning. Check yourself.

Reply
Brian Marshall October 18, 2019 - 2:27 AM

I couldn’t agree more!
As an ‘old’,69 year old guy, making the transition from Windows, I find 90% of people responding to us ‘newbie’s’ queries are so up themselves, because they have a bit of knowledge, that their responses are often as useful as ‘tits on a bull’, instead of trying to be helpful.
Arrogance and selfishness are perhaps the worst human traits and unfortunately, they are often represented in a lot the forums.

Reply
Keith June 14, 2022 - 5:16 PM

From the point of view of Gen X. Clearly yet another Millennial living in his mom’s basement with nothing better to do. Who also has no social skills and basic human kindness.

napoleon March 31, 2019 - 10:14 AM

thanks Kiran you are helpful to me from costa rica with manjaro 18. gnome

Reply
Bruce June 27, 2019 - 5:01 AM

Thanks Kiran
I am using various distros on my computers including Manjaro18 and look for your comments on each one as I find your advise easier and informative.
Thanks mate.
Tim (Country Town, New South Wales, Australia)

Reply
Phil September 19, 2019 - 6:47 AM

command: pamac update (not as root/sudo)
If you have packages from AUR installed

Reply
Peter November 15, 2019 - 3:23 PM

The following is an example of the messages I get on updating, which I find confusing: desktop-base: local (3:2018.10.29-1) is newer than community (2:2019. It seems to be telling me Local is newer, but the dates indicate the Community looks much newer.

Also I notice there is a yes or no choice, with one of them in capitals eg: Y/n or y/N. I am picking it is best to pick the Capital if in doubt?

Reply
Pat February 11, 2020 - 5:26 AM

Hi. I am using Arch Linux. For Windows 10 / English, I can download this version only : AcroRdrDC2000620034_en_US.exe and not the more recent version presented at first in the window at step 3.
Moreover, while I think to have followed precisely your protocol, I cannot find the acroread executable under the .wine hierarchy. PDF files are associated with a lot of other previewers, such as okular, but the Adobe reader is not found !
Please, do you have any idea ? Thanks for your attention.

Reply
Shreak April 9, 2020 - 11:57 PM

how do we install a vpn in manjaro linux?

Reply
Hu February 3, 2022 - 3:22 AM

bro your question has been around it seems about two years now and it seems it is still relevant.

Reply
David March 2, 2021 - 11:03 PM

Update breaks the Manjaro OS
I have Manjaro version 18.0.4 (Illyria) installed on my laptop (Lenovo Thinkpad T510 — 128 GB SSD). When I want to install a program, pacman tries to update the whole system first, is unable to finish and breaks the OS. Then I have to reinstall the OS all over again. Any time I try to update the system, or refresh databases it can’t finish and breaks the OS. How can I get around this issue?

Reply

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.