- Newest
- Most votes
- Most comments
Hello, If you get a notification that your disk space is full while you're attempting to create or import a file, you can delete files to increase space.
To remove all of your files and reset your project, run the following command from the terminal.
rm -rf .
The following command deletes a conda environment from your project.
conda remove --name <ENVIRONMENT_NAME> --all
The command below removes all the files from the SageMaker studio lab instance as stated by Aleksandr_P
rm -rf /home/studio-lab-user/
However, this command is not suitable as it deletes some system packages such as the clear command:
(studiolab) studio-lab-user@default:~/sagemaker-studiolab-notebooks$ clear bash: /home/studio-lab-user/.conda/envs/studiolab/bin/clear: No such file or directory (studiolab) studio-lab-user@default:~/sagemaker-studiolab-notebooks$
The clear
command cannot be identified.
Probably safe to say that the best way depends on what you were doing with the instance. Personally I'd dig into the file system a bit and see what is eating up your disk space and possibly remove unneeded files. I'm sure there are more "nuclear" options that completely wipe and restart the instance, the following assumes you want to keep the instance running...
For example, I was running some ML workflows in a notebook which involved a lot of model downloads that ate up disk space. I ran out of space pretty quickly. So I first checkout to see if there were temp files accumulating (I knew there were, just wasn't sure where).
cd /home/studio-lab-user ls -la
The second command lists all files and directories including hidden ones starting with .
, which revealed some application-specific cache directories, conda envs, etc. Then
du -h -d1
to display "human-readable disk usage one level down from current directory". In my case, there was a temporary .cache
directory using 20Gb that I didn't need, so I removed it.
rm -rf .cache
Hope this helps!
Relevant content
- asked 7 months ago
- asked 2 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 10 months ago
One can restart the instance in order to restore the lost packages.