From 43350eaa417e5a949d51cfe5388c8334a60aafe2 Mon Sep 17 00:00:00 2001 From: Phani Pavan K Date: Fri, 6 Feb 2026 13:02:29 +0530 Subject: [PATCH] print reclaimed size when uninstalling env, fixed #10 --- penv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/penv b/penv index 454cf8c..08bbefa 100755 --- a/penv +++ b/penv @@ -12,7 +12,7 @@ usage() { echo "" echo "Usage: penv " echo "Commands:" - echo " - new - Create a new environment, optional, defaults to system's default python" + echo " - new - Create a new environment, optional, defaults to system's default python" echo " ex: penv new tools 3.13 -> creates new environment by the name tools, using Python 3.13" echo " ex: penv new main -> creates new env with the name main, using the default Python version on the system" echo " - del - Delete existing environment" @@ -86,12 +86,14 @@ delete(){ read -r -n 1 -p "Remove environment $name (y/N)? " choise case $choise in [yY]) + size=$(du "$HOME"/.envs/"$name" -sh | cut -f1) source "$HOME"/.envs/"$name"/bin/activate echo echo Spec $(jupyter-kernelspec remove -f -y "$name") deactivate rm -r "$HOME/.envs/$name" echo "Data Removed $HOME/.envs/$name" + echo "Reclaimed $size" ;; [nN]) echo ""