Downgrading packages (Slovenský)

From ArchWiki
Revision as of 17:11, 12 February 2011 by Olgo (Talk | contribs) (Čast prekladu)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Nasledujúci text popisuje postup pre downgrade balíčku na staršiu než aktuálnu verziu. Tento postup nieje doporučovaný a je nevyhnutný výhradne v prípade zanesenia chýb do aktuálnej verzie balíčku.

Poznámka vývojára:

Pred downgradom, zvážte svoje dôvody. Ak je dôvodom chyba, pomôžte prosím ako Arch linuxu tak i upstream vývojárom tým, že obetujete pár minút tvorbou bug reportu. Nakoľko Arch je rolling release distribúcia budete nepretržite pracovať s novými verziami balíčkov a čas od času narážať na chyby.

My i upstream vývojári oceňujeme toto úsilie. Ušetrí nám hodiny testovania, a pomôže nám vydávať stabilnejší software.


Downgrading je proces pri ktorom je odinštalovaná aktuálna verzia balíčku a je nahradená bezprostredne predošlou či ľubovoľnou staršou verziou.

Medzi dôvody medzi inými patrí: aktuálna verzia obsahuje chybu, neobsahuje požadovanú funkcionalitu alebo ide o experimentálnu verziu balíčku a užívateľ považuje za jednoduchšie vrátiť sa k staršej verzii než čakať na vydanie novej.

Tento proces môže potenciálne viesť k downgradu iných balíčkov. Po inštalácii veľkého množstva testovacích či experimentálnych balíčkov a rozsiahlejších zmenách konfigurácie môže byť jednoduchšie reinštalovať systém než pokúšať sa o downgrade.


Nutno pamätať na nasledujúce fakty. Je potreba prehodnotiť závislosti každého programu nakoľko funkcionalita požadovaných knižníc sa môže s každou verziou meniť. Úspešné riešenie preto musí zahrnovať downgrade i týchto balíčkov.

Ďalej je nutné sa uistiť, že dané balíčky neboli odstránené zo systému prípadne že sú dostupné z iných zdrojov. Rolling release systém repozitárov Arch Linuxu je aktualizovaný automaticky bez zálohy starších verzií balíčkov.

Third, we must be careful with changes to configuration files and scripts. At this point in time, we will rely upon pacman to handle this for us, as long as we do not bypass any safeguards it contains.

Please keep in mind that this issue brings us to the cutting edge of pacman package management development. The Arch Rollback Machine concept is being developed and awaiting useful incorporation into pacman. Once that occurs, this will become automated. Until then, please follow the instructions following this.

How to downgrade a package

  • Q: I just ran pacman -Syu and package XYZ was upgraded to version N from version M. This package is causing problems on my computer, how can I downgrade from version N to the older version M?
  • A: You may be able to downgrade the package trivially by visiting /var/cache/pacman/pkg on your system and seeing if the older version of the package is stored there. (If you have not run pacman -Scc recently, it should be there). If the package is there, you can install that version using pacman -U pkgname-olderpkgver.pkg.tar.gz. When the package has been downloaded manually, it might be necessary to specify the full path of the package.

This process will remove the current package, it will carefully calculate all of the dependency changes, and it will install the older version you have chosen with the proper dependencies down the line.

Note: If you change a fundamental part of the OS, you may end up with the need to take out literally dozens of packages and replace them with their older version. Or they may just be gone and you will have to put them back in a manual, piece-meal fashion, while being careful that a particular upgrade does not want to re-install the undesirable package version you didn't want in the first place.

There is also a package in the AUR called downgrade. This is a simple bash script which will look in your cache for older versions of packages. It will also search the A.R.M. if there is no package in your cache. You can then select a package to install. It basically just automates the processes outlined here. Check downgrade --help for usage information.

Finding Your Older Version

There are three ways to do this.

Out-Of-Sync Mirrors

If you can not find older versions on your system, check if one of the mirrors is out of sync, and get it from there. Click here to see the status of mirrors.

You can also check of this mirror, which stores old packages:


The Arch Rollback Machine (ARM) contains archived snapshots of all the repos going back to 1 November 2009. The site is in a state of flux as of this date (21 November 2009), and now has lost the items back thru 1 October 2008, as previously reported.

If you are interested in ARM, it would be best to view the introductory forum announcement and discussion, so as to stay abreast of the current progress of the project. The introductory forum thread is here.

It is said that the goal was to construct the urls in such a way as to facilitate easy wget+pacman scripting to "roll back" your system to a particular date. The automation process is not yet explained. To just manually search for a particular package, one can use the search page which has been provided at ARM Search.

Re-Compile The Package

In worst-case scenario, if the package is not located anywhere else, you will need to compile the older version yourself. To do this you will need a PKGBUILD for the file; you could edit the existing PKGBUILD provided by ABS to use older sources, or you can visit and search for the package you wish to downgrade. Once you find it, click "View SVN entries" and select "View Log". Locate the version you need and click on the path. Then just download the files located in that directory and build it with makepkg.

Other Information

The basic concept of user control in pacman package management is to edit the pacman.conf file by logging in as root at the command prompt and using "nano /etc/pacman.conf" (without the quotes) to edit that file. (While this can often be done from within your GUI frontend of choice, such as Shaman, sometimes it is more accurate to do it right from the CLI. It is suggested that you clean up any accumulated junk while in the file.)

One is simply going to be changing the locations of repositories in which pacman searches for programs. Remarking out any existing repos by the use of the pound sign at the begining of the line will leave the current ones without making them accessible to pacman and the package management system.

For instance, to add a repository from the ARM, one simply remarks-out the old line and adds the appropriate directory location in the format:


In this example, the date section is taking whatever packages are available as of the date of November 1st, 2009. Please note that all repositories are snapshots of the official repositories. You need only change the mirror in Template:Filename, placing an ARM mirror at the top. e.g$repo/os/i686 to sync all official repositories listed in Template:Filename to the chosen ARM mirror then update with:

pacman -Syy  # refresh the sync databases
pacman -Suu  # downgrade all packages with a lower version in the repos

This alone does not guarantee a seemless rollback as there are sometimes package conflicts with regards to verion numbers, etc. If you know the repository it may be easier to visit the global mirror, e.g, note the omission of the date.

What about dependencies?

  • Q: I can not downgrade a package, because of dependencies.
  • A: You can ignore dependencies when upgrading or removing with 'd'. e.g. pacman -Ud pkgpkgname-olderpkgver.pkg.tar.gz but this might break your system further.

Stopping Pacman from updating certain packages

  • Q: How do I stop Pacman from upgrading downgraded packages?
  • A: With the "IgnorePkg" variable in Template:Filename.

Template:Codeline in your Template:Filename instructs Pacman to ignore any upgrades for selected packages when performing a --sysupgrade.

Reverting to a Savepoint

  • Q: I want to go back to how my system was yesterday.
  • A: It is easy provided you enabled periodic snapshots.

You can rely on a logical volume manager (LVM) for creating and maintaining snapshots. These snapshots should not be confused with CVS snapshots. LVM snapshots are kernel-level filesystem snapshots that, unlike a full backup, use a COW (copy-on-write) scheme which means that it occupies very little disk space so long as no files were modified, and if files were modified, the snapshot occupies only a little more than the disk space needed to store the pre-modified files. This usually means that you can snapshot a 35GB system with only 2GB free space, considering that pacman -Sy will likely modify far less than 2GB of data. If the state of your system after the upgrade is undesirable, you can quickly rollback to previous snapshot images of your system.

See Also

  • Arch Build System for more information.
  • LVM for how to enable snapshots and how to revert to their state.