Question: I've tried to install bunch of python packages in Google Cloud Platform Console. However, the disk space was not enough and installation failed. Interestingly, at some point, the network connection was lost and I should reconnect it.

And then I've checked some packages which had been already installed before I tried to install other bunch of python packages.

Expecting

```
$ python
Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> 

```

But numpy was not found. This is the actual result.

```
$ python 
Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>> 

```

Is this a known issue? How can I prevent happening it again?

---

**Repro steps**

1. Click "Activate Google Cloud Shell" icon on the top bar
2. I have two projects and one of the projects is selected.
3. Install python-numpy package like this :

```
Welcome to Cloud Shell! For help, visit https://cloud.google.com/cloud-shell/help.
$ sudo apt-get install python-numpy

```
4. Try to import numpy on python prompt --> it is successfully imported.
5. Close the tab of the browser or just close the shell tab
6. A few hours later (maybe 2 hours later), reopen the Cloud Shell.
7. Try to import numpy on python prompt --> "No module named numpy" error.

Answer: 
This is a known limitation of Google Cloud Shell - after about an hour of inactivity, any modifications outside of $HOME are lost, including installed packages. See [Custom installed software packages and persistence](https://cloud.google.com/shell/docs/limitations#custom_installed_software_packages_and_persistence "Custom installed software packages and persistence").

Also note this quote regarding [Usage limits](https://cloud.google.com/shell/docs/limitations#usage_limits "Usage limits"):

> 
> If you do not access Cloud Shell regularly, we may recycle your home disk. You will receive an email notification before we do so and simply starting a session will prevent its removal. Please consider a different solution on Google Cloud Storage for sensitive data you wish to store long term.
> 
> 
>
Cloud shell is empharal, So everything after `$HOME` is gone. But you can use `.customize_enviroment` to add apt packages and apt-get packages like so

```sh
#!/bin/bash
# It runs as root so no need to use sudo
apt-get install test

```