How To Downgrade A Package In Arch Linux
Arch Linux, as a rolling and DIY distribution, needs to be updated with caution, especially when installing or updating packages from third-party repositories such as AUR. Inadvertent operation may cause system crashes, and it is your responsibility to maintain the stability of Arch Linux. However, errors are inevitable, and pursuing the latest software can sometimes lead to software package corruption. In this case, no panic is needed! You can easily roll back to previous stable versions. This tutorial briefly describes how to downgrade packages in Arch Linux and its derivatives such as EndeavourOS and Manjaro Linux.
The officially recommended method is only valid if the pacman cache is not cleared. If you have cleared the cache, you can still downgrade it using the following methods.
For Arch Linux and its derivatives, there is a utility called "downgrade" that helps you downgrade installed packages to any available older versions. This utility checks for older versions of required packages in your local cache and remote server (Arch Linux repository). You can select any of the old stable packages from the list and install it.
Table of contents
- Install downgrade from AUR
- Install downgrade from the archlinuxfr repository
- Downgrade packages in Arch Linux
- How to avoid package corruption and improve Arch Linux stability?
- I don't trust AUR and other unofficial repositories. what to do?
Install the downgrade utility in Arch Linux
The "downgrade" package is not available in the official repository. You should install it from AUR or unofficial archlinuxfr repository. First, we will explain how to install it from AUR.
Install downgrade from AUR
The downgrade package is available in AUR , so you can install it using any AUR helper like Paru or Yay .
Using Paru :
<code>$ paru -S downgrade</code>
Using Yay :
<code>$ yay -S downgrade</code>
Install downgrade from the archlinuxfr repository
Warning: Official Arch Linux developers and trusted users do not perform any type of test to verify the content of the unofficial repository. You must decide whether to trust its maintainers and assume full responsibility for any consequences of using any unofficial repository.
To add the archlinuxfr repository, edit the /etc/pacman.conf file:
<code>$ sudo nano /etc/pacman.conf</code>
Add the following line:
<code>[archlinuxfr] Server = http://repo.archlinux.fr/$arch</code>
Save and close the file.
Update the repository with the following command:
<code>$ sudo pacman -Syu</code>
Then, install the "Downgrade" utility from your terminal using the following command:
<code>$ sudo pacman -S downgrade</code>
Downgrade packages in Arch Linux
Typical usage of the "downgrade" command is:
<code>$ sudo downgrade [PACKAGE, ...] [-- [PACMAN OPTIONS]]</code>
Suppose you want to downgrade the opera browser to any available older version.
To do this, run:
<code>$ sudo downgrade opera</code>
This command lists all available versions (old and new versions) of the opera package obtained from the local cache and remote image.
Sample output:
<code>可用的软件包: 1) opera-37.0.2178.43-1-x86_64.pkg.tar.xz (本地) 2) opera-37.0.2178.43-1-x86_64.pkg.tar.xz (远程) 3) opera-37.0.2178.32-1-x86_64.pkg.tar.xz (远程) 4) opera-36.0.2130.65-2-x86_64.pkg.tar.xz (远程) 5) opera-36.0.2130.65-1-x86_64.pkg.tar.xz (远程) ... (其余输出省略) ...选择一个软件包的编号:</code>
Simply enter the package number of your choice and press Enter to install it.
That's it. The currently installed package will be downgraded to the old version.
Suggested reading:
- How to downgrade all packages to specific dates in Arch Linux
How to avoid package corruption and improve Arch Linux stability?
Before updating Arch Linux, check Arch Linux news and forums for any reported issues. I've been using Arch Linux as my main operating system for years. Here are some simple tips I've learned over a period of time to avoid installing unstable packages in Arch Linux.
- Avoid partial upgrades. This means never to run "pacman -Sy
” or “pacman -Sy”. This command will partially upgrade your system while installing the package. Instead, first update the system with “pacman -Syu” and then use “package -S ”Installing the package. - Avoid using the "pacman -Syu --force" command. The --force flag will ignore package and file conflicts and you may end up with corrupted packages or corrupted systems.
- Don't skip dependency checking. This means not to use "pacman -Rdd
”. This command will avoid dependency checking when deleting a package. If you run this command, the critical dependencies required by another important package may also be removed. Eventually, it will break your Arch Linux. - Regular backup of important data and configuration files is always a good habit to avoid any data loss.
- Be careful when installing packages from third-party and unofficial repositories such as AUR or archlinuxfr. And do not install software packages in large quantities of development.
For more details, see the Arch Linux Maintenance Guide .
I don't trust AUR and other unofficial repositories. what to do?
The 'downgrade' package is hosted in AUR. If you doubt the authenticity of the AUR package and you do not want to install the package from AUR and unofficial repositories (archlinuxfr), I recommend that you downgrade the package as explained in the Arch Wiki.
- Downgrade package
resource:
- Downgrade GitHub repository
Related readings:
- How to downgrade packages in Ubuntu
This revised output maintains the original image and its format while paraphrasing the text to create a pseudo-original article. The structure and content remains largely the same, but the wording has been altered to avoid direct copying.
The above is the detailed content of How To Downgrade A Package In Arch Linux. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Linux is best used as server management, embedded systems and desktop environments. 1) In server management, Linux is used to host websites, databases, and applications, providing stability and reliability. 2) In embedded systems, Linux is widely used in smart home and automotive electronic systems because of its flexibility and stability. 3) In the desktop environment, Linux provides rich applications and efficient performance.

The five basic components of Linux are: 1. The kernel, managing hardware resources; 2. The system library, providing functions and services; 3. Shell, the interface for users to interact with the system; 4. The file system, storing and organizing data; 5. Applications, using system resources to implement functions.

Linux system management ensures the system stability, efficiency and security through configuration, monitoring and maintenance. 1. Master shell commands such as top and systemctl. 2. Use apt or yum to manage the software package. 3. Write automated scripts to improve efficiency. 4. Common debugging errors such as permission problems. 5. Optimize performance through monitoring tools.

The methods for basic Linux learning from scratch include: 1. Understand the file system and command line interface, 2. Master basic commands such as ls, cd, mkdir, 3. Learn file operations, such as creating and editing files, 4. Explore advanced usage such as pipelines and grep commands, 5. Master debugging skills and performance optimization, 6. Continuously improve skills through practice and exploration.

Linux is widely used in servers, embedded systems and desktop environments. 1) In the server field, Linux has become an ideal choice for hosting websites, databases and applications due to its stability and security. 2) In embedded systems, Linux is popular for its high customization and efficiency. 3) In the desktop environment, Linux provides a variety of desktop environments to meet the needs of different users.

Linux devices are hardware devices running Linux operating systems, including servers, personal computers, smartphones and embedded systems. They take advantage of the power of Linux to perform various tasks such as website hosting and big data analytics.

The disadvantages of Linux include user experience, software compatibility, hardware support, and learning curve. 1. The user experience is not as friendly as Windows or macOS, and it relies on the command line interface. 2. The software compatibility is not as good as other systems and lacks native versions of many commercial software. 3. Hardware support is not as comprehensive as Windows, and drivers may be compiled manually. 4. The learning curve is steep, and mastering command line operations requires time and patience.

The Internet does not rely on a single operating system, but Linux plays an important role in it. Linux is widely used in servers and network devices and is popular for its stability, security and scalability.
