Guide | How To Linux - Some simple tips for Arch Linux maintenance

The associated guide may contain user-generated or external content.

Soulbound

Level 29
Thread author
Verified
Well-known
Jan 14, 2015
1,761
For those running Arch, you would know how important is not to always update straight away packages.

However, for those new to Arch Linux or any distributions based on Arch, this simple guide will teach you how to downgrade/rollback a package that you had previously installed as well as set a "ignore" list of packages for when you do an update on the system.

To show all packages in cache that you have downloaded (unless you have cleared its contents)

On a terminal:

Run: cd /var/cache/pacman/

List contents via command:
Run: l
Code:
pkg/ will be displayed.
Run: cd pkg/
Run: l

This will show all versions of packages you have installed.

If you want to search for a specific package, run:
ls packagename*

(replace packagename with the actual package you are searching for).



To downgrade/rollback to a previous version of the same package:
On the same directory in a terminal /etc/var/cache/pacman/pkg/ :

ls packagename*

Output should show for example:
package1.pkg.tar.xz package2.pkg.tar.xz

Now you want to go back to package1 because package2 is unstable or has issues etc (always pay attention to broken dependencies when upgrading packages, make note of them just in case. Trust me it will save you a lot of work...

Run:
sudo pacman -U packagename1.pkg.tar.xz

Then type Yes to install.


Thats how you downgrade/rollback a package



Now to add a package to an "ignore" list, it is simple. You just need to add an entry in the pacman config file:

On a terminal run the following commands (note that this is considering you are using NANO as the text editor):

sudo nano /etc/pacman.conf

enter password

Under General Options or Options
Add the following:

Code:
IgnorePkg=packagename
(the packagename above is the package you want to ignore it from update)


Then press CTRL X and then Y and press Enter (Saves and exit)

Note: if you want to ignore a group of packages for same main package, use IgnoreGroup instead of IgnorePkg. For the full list of groups, visit Arch Groups page


When doing a update (sudo pacman -Syu), it will show in an output the packages in the Ignore section.


As an Arch user, I myself am subscribed to the arch mailing list.

Hope this helps any Arch user who is having some trouble.
 
Last edited:

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top