# How to update Lynis

**URL:** <https://help.nextcloud.com/t/how-to-update-lynis/126315>\
**Category:** NextcloudPi Documentation\
**Tags:** 3-updates, external\_apps, update, ncp\
**Created:** [October 29, 2021, 11:43pm UTC](https://help.nextcloud.com/t/how-to-update-lynis/126315 "2021-10-29T23:43:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ncpbot](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ncpbot/32/43429_2.png) [@ncpbot](https://help.nextcloud.com/u/ncpbot)\
**Post date:** [October 29, 2021, 11:43pm UTC](https://help.nextcloud.com/t/how-to-update-lynis/126315/1 "2021-10-29T23:43:05Z")

</div>

![image690x51](https://help.nextcloud.com/uploads/default/original/3X/7/9/7998793209f43e98c6e5c0463f559925011daa68.jpeg)

**After running nc-audit your might see the following and wonder how to update Lynis:**

`! Version of Lynis is very old and should be updated [LYNIS]

```auto
  https://cisofy.com/controls/LYNIS/`

```

Well this is how you can update Lynis _(these instructions were slightly modified from [CISOfy](https://packages.cisofy.com/community/#debian-ubuntu))_

### Import key from server

Copy and paste the line below and then hit enter.  
`sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C80E383C3DE9F082E01391A0366C67DE91CA5D5F`

After you hit enter, you should see this code output:

```auto
Executing: /tmp/apt-key-gpghome.1wEImqGOzn/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys C80E383C3DE9F082E01391A0366C67DE91CA5D5F
gpg: key 366C67DE91CA5D5F: public key "CISOfy Software (signed software packages) " imported
gpg: Total number processed: 1
gpg: imported: 1

```

### _Side note if you use your software in English:_

If you use your software in English, you can enter the following code to configure APT to skip downloading translations

Copy and paste the line below and then hit enter.  
`echo 'Acquire::Languages "none";' | sudo tee /etc/apt/apt.conf.d/99disable-translations`

After you hit enter, you should see this code output:  
`Acquire::Languages "none";`

### 2. Add software repository

Copy and paste the line below and then hit enter.  
`echo "deb https://packages.cisofy.com/community/lynis/deb/ stable main" | sudo tee /etc/apt/sources.list.d/cisofy-lynis.list`

After you hit enter, you should see this code output:  
`deb https://packages.cisofy.com/community/lynis/deb/ stable main`

### Run apt update

Copy and paste the line below and then hit enter.  
`sudo apt update`

After you hit enter, your code output will look similar to what is pasted below:

```auto
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Get:3 https://packages.cisofy.com/community/lynis/deb stable InRelease [11.4 kB]
Get:4 https://packages.cisofy.com/community/lynis/deb stable/main armhf Packages [672 B]
Fetched 12.1 kB in 1s (7,075 B/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
7 packages can be upgraded. Run 'apt list --upgradable' to see them.

```

### Run apt upgrade

Copy and paste the line below and then hit enter.  
`sudo apt upgrade`

After you hit enter, your code output will look similar to what is pasted below:

```auto
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 lynis raspberrypi-bootloader raspberrypi-kernel
7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 70.0 MB of archives.
After this operation, 105 kB of additional disk space will be used.
Do you want to continue? [Y/n]

```

Type `Y` to continue and then hit `Enter`.

After you hit enter, your code output will look similar to what is pasted below. Also, note I didn’t paste all of the output because it was long)

```auto
Get:1 http://archive.raspberrypi.org/debian stretch/main armhf libraspberrypi-doc armhf 1.20180910-1 [31.4 MB]
Get:2 https://packages.cisofy.com/community/lynis/deb stable/main armhf lynis all 2.6.8-100 [216 kB]
...etc...
Preparing to unpack .../0-lynis_2.6.8-100_all.deb ...
Unpacking lynis (2.6.8-100) over (2.4.0-1) ...
dpkg: warning: unable to delete old directory '/etc/lynis/plugins': Directory not empty   
...etc...
Setting up lynis (2.6.8-100) ...
Installing new version of config file /etc/lynis/default.prf ...
Processing triggers for mime-support (3.60) ...
...etc...
Setting up libraspberrypi0 (1.20180910-1) ...
Setting up libraspberrypi-doc (1.20180910-1) ...
Setting up libraspberrypi-dev (1.20180910-1) ...
Setting up libraspberrypi-bin (1.20180910-1) ...

```

### Check if Lynis has been updated

Copy and paste the line below and then hit enter.  
`lynis show version`

After you hit enter, you should see it list the latest version:  
‘2.6.8’

### You’re done!

* * *

_We hope this doc was helpful, if you encounter any issues please reach out to the [community](https://help.nextcloud.com/t/forum-github-or-chat-which-to-use-when/126318)._  
_These docs are written by volunteers, please consider becoming one of them.  
Contact the wiki team at [Matrix](https://matrix.to/#/#nextcloudpi:matrix.org) or [Telegram](https://t.me/NCP_Wiki_Team)_

---

<div class="post-metadata">

**Author:** ![anon75456558](https://help.nextcloud.com/letter_avatar/anon75456558/32/6_449c533f586939b6e5f246632a46421f.png) [@anon75456558](https://help.nextcloud.com/u/anon75456558)\
**Post date:** [July 15, 2022, 8:42pm UTC](https://help.nextcloud.com/t/how-to-update-lynis/126315/2 "2022-07-15T20:42:44Z")

</div>

A post was merged into an existing topic: [About moving the articles](https://help.nextcloud.com/t/about-moving-the-articles/134642/72)
