# Updating Mattermost from 16.1 - Stuck and mattermost wont restart

**URL:** <https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516>\
**Category:** Troubleshooting\
**Created:** [November 26, 2022, 2:14pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516 "2022-11-26T14:14:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [November 26, 2022, 2:14pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/1 "2022-11-26T14:14:41Z")

</div>

In the upgrade process when i run the command:  
ls /opt/mattermost **I get** : client config data logs plugins

proceeding to the next step  
sudo find mattermost/ mattermost/client/ -mindepth 1 -maxdepth 1 ! ( -type d ( -path mattermost/client -o -path mattermost/client/plugins -o -path mattermost/config -o -path mattermost/logs -o -path mattermost/plugins -o -path mattermost/data -o -path **mattermost/yourFolderHere** ) -prune ) | sort | sudo xargs rm -r

I guess i’m not exactly sure what to put in the: mattermost/yourFolderHere portion:  
My existing directory is located at: etc/mattermost /opt/mattermost/bin/mattermost

ive tried different combinations here but am unsure exactly what i should be putting here because nothing i try seems to work.

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [November 26, 2022, 2:26pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/2 "2022-11-26T14:26:49Z")

</div>

Hi anatwick,

you do not need to put anything in the `yourFolderHere` portion; this was just meant as an example if you have any custom directories below the `/opt/mattermost` parent directory, because if you do, the documentation will remove all of them by default. If you do not have any custom directories (which you most likely don’t, otherwise you would know that), you can skip this command. It was meant as an alternative to command above in the documentation.

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [November 26, 2022, 2:50pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/3 "2022-11-26T14:50:22Z")

</div>

i tried that as well but get:  
find: ‘mattermost/’: No such file or directory  
find: ‘mattermost/client/’: No such file or directory  
rm: missing operand

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [November 26, 2022, 3:05pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/4 "2022-11-26T15:05:14Z")

</div>

This command only works when you’re in the directory `/opt`. It seems you’ve moved out of this directory, so please try `cd /opt` and continue with your commands.

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [November 26, 2022, 3:22pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/5 "2022-11-26T15:22:37Z")

</div>

I did just that and was still left with:  
rm: missing operand

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [November 26, 2022, 3:23pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/6 "2022-11-26T15:23:06Z")

</div>

Please post a screenshot or the full commands you entered and the full output you were seeing.

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [November 26, 2022, 3:24pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/7 "2022-11-26T15:24:06Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/6/60f8887f17dc0a2d94a700b7c5c44698bf432eba.png)

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [November 26, 2022, 3:25pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/8 "2022-11-26T15:25:02Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/6/6d2446c14be9ea5e6a72efc6bb508698afb8586e.png)

---

<div class="post-metadata">

**Author:** ![anatwick](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anatwick](https://forum.mattermost.com/u/anatwick)\
**Post date:** [November 26, 2022, 3:29pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/9 "2022-11-26T15:29:45Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/a/a73c836a63a1c729f9994ba3c572371ec6b4b1fa.png)

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [November 26, 2022, 4:04pm UTC](https://forum.mattermost.com/t/updating-mattermost-from-16-1-stuck-and-mattermost-wont-restart/14516/10 "2022-11-26T16:04:32Z")

</div>

This command is not supposed to be run multiple times and you’ve already run it successfully, so you can now continue to the next step (that’s why you get the error message from rm telling you that there is nothing more to delete, basically…).  
So go ahead with Step 8 (Copy the new files to your install directory) in [the instructions](https://docs.mattermost.com/upgrade/upgrading-mattermost-server.html) now.
