# lock package in autoYast

**URL:** <https://forums.suse.com/t/lock-package-in-autoyast/35542>\
**Category:** SLES Install-Boot\
**Created:** [April 6, 2021, 8:36am UTC](https://forums.suse.com/t/lock-package-in-autoyast/35542 "2021-04-06T08:36:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://forums.suse.com/u/Frederic)\
**Post date:** [April 6, 2021, 8:36am UTC](https://forums.suse.com/t/lock-package-in-autoyast/35542/1 "2021-04-06T08:36:36Z")

</div>

Hello  
I have a few servers installed with SLES12SP3, on which custom versions of postgresql (version 10.5-1PGDG.sles12) are installed.  
I can upgrade them through an autoyast to SLES12SP5 but I can’t prevent the update of these postgresql packages.  
Following the autoyast documentation, I added an entry for ZYPP\_LOCKFILE\_ROOT in sys\_config part for using zypper in pre-scripts part :  
` <sysconfig config:type="list" >`  
` <sysconfig_entry>`  
`<sysconfig_key>ZYPP_LOCKFILE_ROOT</sysconfig_key>`  
`<sysconfig_path>/var/run/autoyast</sysconfig_path>`  
`</sysconfig_entry>`  
`</sysconfig>`

I just created a simple script in pre-scripts part with a `> zypper al postgresql*` command but it doesn’t work : postgresql packages are also updated.  
I made a manual test : before applying the upgrade through autoyast, I simply start the server and apply the zypper al postgresql\*, to add the lock on these packages. The upgrade works well and custom packages for postgresql are still installed on server.  
How can I report this lock into the autoyast file ?
