Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove Lama Cleaner
#1
Hi, I installed Lama Cleaner using these commands in Ubuntu 22.04

Code:
pip install lama-cleaner

Code:
lama-cleaner --model=lama --device=cpu --port=8080

It took a lot of space than I imagined ( around 4GB, I guess ) and it is not waiting till I draw the mask completely. The result was not very satisfactory for me either. So I tried to save some space by removing it using

Code:
pip uninstall lama-cleaner


The command was executed immediately, but I see that the space is still gone. I tried to remove the cache using Bleachbit as root, but only 320 MB was removed.

Any chance I can completely remove Lama Cleaner and win back the space?

Thanks.
Reply
#2
This could help
pip list -v

It looks like lama cleaner needs a lot of support files. Maybe there is a list of deps for lama-cleaner?
Reply
#3
Are the files still there? Is there any lingering process that still uses the files (in which case the space won't be reclaimed until these files are closed).
Reply
#4
@Tas_mania , I got a huge list

Quote:Package                  Version       Location                                       Installer
------------------------ ------------- ---------------------------------------------- ---------
accelerate               0.16.0        /home/myPC/.local/lib/python3.10/site-packages pip
aiodns                   3.0.0         /home/myPC/.local/lib/python3.10/site-packages pip
aiofiles                 23.1.0        /home/myPC/.local/lib/python3.10/site-packages pip
aiohttp                  3.8.4         /home/myPC/.local/lib/python3.10/site-packages pip
aioping                  0.3.1         /home/myPC/.local/lib/python3.10/site-packages pip
aiosignal                1.3.1         /home/myPC/.local/lib/python3.10/site-packages pip
altair                   4.2.2         /home/myPC/.local/lib/python3.10/site-packages pip
anyio                    3.6.2         /home/myPC/.local/lib/python3.10/site-packages pip
appdirs                  1.4.4         /usr/lib/python3/dist-packages
apturl                   0.5.2         /usr/lib/python3/dist-packages
asttokens                2.2.1         /home/myPC/.local/lib/python3.10/site-packages pip
async-timeout            4.0.2         /home/myPC/.local/lib/python3.10/site-packages pip
asyncer                  0.0.2         /home/myPC/.local/lib/python3.10/site-packages pip
asyncio                  3.4.3         /home/myPC/.local/lib/python3.10/site-packages pip
attrs                    22.2.0        /home/myPC/.local/lib/python3.10/site-packages pip
backcall                 0.2.0         /home/myPC/.local/lib/python3.10/site-packages pip
bcrypt                   3.2.0         /usr/lib/python3/dist-packages
beautifulsoup4           4.10.0        /usr/lib/python3/dist-packages
blinker                  1.4           /usr/lib/python3/dist-packages
bluetooth-battery        1.3.2         /home/myPC/.local/lib/python3.10/site-packages pip
Brlapi                   0.8.3         /usr/lib/python3/dist-packages
Brotli                   1.0.9         /usr/lib/python3/dist-packages
certifi                  2020.6.20     /usr/lib/python3/dist-packages
cffi                     1.15.1        /home/myPC/.local/lib/python3.10/site-packages pip
chardet                  4.0.0         /usr/lib/python3/dist-packages
charset-normalizer       3.0.1         /home/myPC/.local/lib/python3.10/site-packages pip
click                    7.1.2         /home/myPC/.local/lib/python3.10/site-packages pip
colorama                 0.4.4         /usr/lib/python3/dist-packages
coloredlogs              15.0.1        /home/myPC/.local/lib/python3.10/site-packages pip
command-not-found        0.3           /usr/lib/python3/dist-packages
contourpy                1.0.7         /home/myPC/.local/lib/python3.10/site-packages pip
cryptography             3.4.8         /usr/lib/python3/dist-packages
cssselect                1.1.0         /usr/lib/python3/dist-packages
cupshelpers              1.0           /usr/lib/python3/dist-packages
cycler                   0.11.0        /home/myPC/.local/lib/python3.10/site-packages pip
dbus-python              1.2.18        /usr/lib/python3/dist-packages
decorator                5.1.1         /home/myPC/.local/lib/python3.10/site-packages pip
defer                    1.0.6         /usr/lib/python3/dist-packages
diffusers                0.12.1        /home/myPC/.local/lib/python3.10/site-packages pip
distro                   1.7.0         /usr/lib/python3/dist-packages
distro-info              1.1build1     /usr/lib/python3/dist-packages
duplicity                0.8.21        /usr/lib/python3/dist-packages
entrypoints              0.4           /home/myPC/.local/lib/python3.10/site-packages pip
exceptiongroup           1.1.0         /home/myPC/.local/lib/python3.10/site-packages pip
executing                1.2.0         /home/myPC/.local/lib/python3.10/site-packages pip
fastapi                  0.87.0        /home/myPC/.local/lib/python3.10/site-packages pip
fasteners                0.14.1        /usr/lib/python3/dist-packages
ffmpy                    0.3.0         /home/myPC/.local/lib/python3.10/site-packages pip
filelock                 3.9.0         /home/myPC/.local/lib/python3.10/site-packages pip
filetype                 1.2.0         /home/myPC/.local/lib/python3.10/site-packages pip
Flask                    1.1.4         /home/myPC/.local/lib/python3.10/site-packages pip
Flask-Cors               3.0.10        /home/myPC/.local/lib/python3.10/site-packages pip
flaskwebgui              0.3.5         /home/myPC/.local/lib/python3.10/site-packages pip
flatbuffers              23.1.21       /home/myPC/.local/lib/python3.10/site-packages pip
fonttools                4.38.0        /home/myPC/.local/lib/python3.10/site-packages pip
frozenlist               1.3.3         /home/myPC/.local/lib/python3.10/site-packages pip
fsspec                   2023.1.0      /home/myPC/.local/lib/python3.10/site-packages pip
future                   0.18.2        /usr/lib/python3/dist-packages
gattlib                  0.20201113    /usr/lib/python3/dist-packages
gradio                   3.18.0        /home/myPC/.local/lib/python3.10/site-packages pip
h11                      0.14.0        /home/myPC/.local/lib/python3.10/site-packages pip
html5lib                 1.1           /usr/lib/python3/dist-packages
httpcore                 0.16.3        /home/myPC/.local/lib/python3.10/site-packages pip
httplib2                 0.20.2        /usr/lib/python3/dist-packages
httpx                    0.23.3        /home/myPC/.local/lib/python3.10/site-packages pip
huggingface-hub          0.12.1        /home/myPC/.local/lib/python3.10/site-packages pip
humanfriendly            10.0          /home/myPC/.local/lib/python3.10/site-packages pip
idna                     3.3           /usr/lib/python3/dist-packages
ImageHash                4.3.1         /home/myPC/.local/lib/python3.10/site-packages pip
imageio                  2.25.1        /home/myPC/.local/lib/python3.10/site-packages pip
importlib-metadata       4.6.4         /usr/lib/python3/dist-packages
iniconfig                2.0.0         /home/myPC/.local/lib/python3.10/site-packages pip
ipaddress                1.0.23        /home/myPC/.local/lib/python3.10/site-packages pip
ipython                  8.10.0        /home/myPC/.local/lib/python3.10/site-packages pip
itsdangerous             1.1.0         /home/myPC/.local/lib/python3.10/site-packages pip
jedi                     0.18.2        /home/myPC/.local/lib/python3.10/site-packages pip
jeepney                  0.7.1         /usr/lib/python3/dist-packages                 flit
Jinja2                   2.11.3        /home/myPC/.local/lib/python3.10/site-packages pip
jsonschema               4.17.3        /home/myPC/.local/lib/python3.10/site-packages pip
keyring                  23.5.0        /usr/lib/python3/dist-packages
kiwisolver               1.4.4         /home/myPC/.local/lib/python3.10/site-packages pip
language-selector        0.1           /usr/lib/python3/dist-packages
launchpadlib             1.10.16       /usr/lib/python3/dist-packages
lazr.restfulclient       0.14.4        /usr/lib/python3/dist-packages
lazr.uri                 1.0.6         /usr/lib/python3/dist-packages
linkify-it-py            1.0.3         /home/myPC/.local/lib/python3.10/site-packages pip
llvmlite                 0.39.1        /home/myPC/.local/lib/python3.10/site-packages pip
lockfile                 0.12.2        /usr/lib/python3/dist-packages
loguru                   0.6.0         /home/myPC/.local/lib/python3.10/site-packages pip
louis                    3.20.0        /usr/lib/python3/dist-packages
lxml                     4.8.0         /usr/lib/python3/dist-packages
macaroonbakery           1.3.1         /usr/lib/python3/dist-packages
Mako                     1.1.3         /usr/lib/python3/dist-packages
markdown-it-py           2.1.0         /home/myPC/.local/lib/python3.10/site-packages pip
MarkupSafe               2.0.1         /usr/lib/python3/dist-packages
matplotlib               3.7.0         /home/myPC/.local/lib/python3.10/site-packages pip
matplotlib-inline        0.1.6         /home/myPC/.local/lib/python3.10/site-packages pip
mdit-py-plugins          0.3.4         /home/myPC/.local/lib/python3.10/site-packages pip
mdurl                    0.1.2         /home/myPC/.local/lib/python3.10/site-packages pip
monotonic                1.6           /usr/lib/python3/dist-packages
more-itertools           8.10.0        /usr/lib/python3/dist-packages
mpmath                   1.2.1         /home/myPC/.local/lib/python3.10/site-packages pip
multidict                6.0.4         /home/myPC/.local/lib/python3.10/site-packages pip
mutagen                  1.45.1        /usr/lib/python3/dist-packages
mypy                     1.0.0         /home/myPC/.local/lib/python3.10/site-packages pip
mypy-extensions          1.0.0         /home/myPC/.local/lib/python3.10/site-packages pip
netifaces                0.11.0        /usr/lib/python3/dist-packages
networkx                 3.0           /home/myPC/.local/lib/python3.10/site-packages pip
numba                    0.56.4        /home/myPC/.local/lib/python3.10/site-packages pip
numpy                    1.23.5        /home/myPC/.local/lib/python3.10/site-packages pip
nvidia-cublas-cu11       11.10.3.66    /home/myPC/.local/lib/python3.10/site-packages pip
nvidia-cuda-nvrtc-cu11   11.7.99       /home/myPC/.local/lib/python3.10/site-packages pip
nvidia-cuda-runtime-cu11 11.7.99       /home/myPC/.local/lib/python3.10/site-packages pip
nvidia-cudnn-cu11        8.5.0.96      /home/myPC/.local/lib/python3.10/site-packages pip
oauthlib                 3.2.0         /usr/lib/python3/dist-packages
olefile                  0.46          /usr/lib/python3/dist-packages
onnxruntime              1.13.1        /home/myPC/.local/lib/python3.10/site-packages pip
opencv-python            4.7.0.68      /home/myPC/.local/lib/python3.10/site-packages pip
opencv-python-headless   4.6.0.66      /home/myPC/.local/lib/python3.10/site-packages pip
orjson                   3.8.6         /home/myPC/.local/lib/python3.10/site-packages pip
packaging                21.3          /usr/lib/python3/dist-packages
pandas                   1.5.3         /home/myPC/.local/lib/python3.10/site-packages pip
paramiko                 2.9.3         /usr/lib/python3/dist-packages
parso                    0.8.3         /home/myPC/.local/lib/python3.10/site-packages pip
pexpect                  4.8.0         /usr/lib/python3/dist-packages
pickleshare              0.7.5         /home/myPC/.local/lib/python3.10/site-packages pip
piexif                   1.1.3         /home/myPC/.local/lib/python3.10/site-packages pip
Pillow                   9.3.0         /home/myPC/.local/lib/python3.10/site-packages pip
pip                      22.0.2        /usr/lib/python3/dist-packages
pluggy                   1.0.0         /home/myPC/.local/lib/python3.10/site-packages pip
pooch                    1.6.0         /home/myPC/.local/lib/python3.10/site-packages pip
prompt-toolkit           3.0.36        /home/myPC/.local/lib/python3.10/site-packages pip
protobuf                 3.12.4        /usr/lib/python3/dist-packages
psutil                   5.9.4         /home/myPC/.local/lib/python3.10/site-packages pip
ptyprocess               0.7.0         /usr/lib/python3/dist-packages                 flit
pure-eval                0.2.2         /home/myPC/.local/lib/python3.10/site-packages pip
PyBluez                  0.23          /usr/lib/python3/dist-packages
pycairo                  1.20.1        /usr/lib/python3/dist-packages
pycares                  4.3.0         /home/myPC/.local/lib/python3.10/site-packages pip
pycparser                2.21          /home/myPC/.local/lib/python3.10/site-packages pip
pycryptodome             3.17          /home/myPC/.local/lib/python3.10/site-packages pip
pycryptodomex            3.11.0        /usr/lib/python3/dist-packages
pycups                   2.0.1         /usr/lib/python3/dist-packages
pydantic                 1.10.5        /home/myPC/.local/lib/python3.10/site-packages pip
pydub                    0.25.1        /home/myPC/.local/lib/python3.10/site-packages pip
Pygments                 2.14.0        /home/myPC/.local/lib/python3.10/site-packages pip
PyGObject                3.42.1        /usr/lib/python3/dist-packages
PyJWT                    2.3.0         /usr/lib/python3/dist-packages
pymacaroons              0.13.0        /usr/lib/python3/dist-packages
PyMatting                1.1.8         /home/myPC/.local/lib/python3.10/site-packages pip
PyNaCl                   1.5.0         /usr/lib/python3/dist-packages
pyparsing                2.4.7         /usr/lib/python3/dist-packages
pyRFC3339                1.1           /usr/lib/python3/dist-packages
pyrsistent               0.19.3        /home/myPC/.local/lib/python3.10/site-packages pip
pytest                   7.2.1         /home/myPC/.local/lib/python3.10/site-packages pip
python-apt               2.4.0+ubuntu1 /usr/lib/python3/dist-packages
python-dateutil          2.8.1         /usr/lib/python3/dist-packages
python-debian            0.1.43ubuntu1 /usr/lib/python3/dist-packages
python-multipart         0.0.5         /home/myPC/.local/lib/python3.10/site-packages pip
pytz                     2022.1        /usr/lib/python3/dist-packages
PyWavelets               1.4.1         /home/myPC/.local/lib/python3.10/site-packages pip
PyX                      0.16          /home/myPC/.local/lib/python3.10/site-packages pip
pyxattr                  0.7.2         /usr/lib/python3/dist-packages
pyxdg                    0.27          /usr/lib/python3/dist-packages
PyYAML                   5.4.1         /usr/lib/python3/dist-packages
regex                    2022.10.31    /home/myPC/.local/lib/python3.10/site-packages pip
rembg                    2.0.30        /home/myPC/.local/lib/python3.10/site-packages pip
reportlab                3.6.8         /usr/lib/python3/dist-packages
requests                 2.25.1        /usr/lib/python3/dist-packages
rfc3986                  1.5.0         /home/myPC/.local/lib/python3.10/site-packages pip
rich                     13.3.1        /home/myPC/.local/lib/python3.10/site-packages pip
scikit-image             0.19.3        /home/myPC/.local/lib/python3.10/site-packages pip
scipy                    1.9.3         /home/myPC/.local/lib/python3.10/site-packages pip
scour                    0.38.2        /usr/lib/python3/dist-packages
screen-resolution-extra  0.0.0         /usr/lib/python3/dist-packages
SecretStorage            3.3.1         /usr/lib/python3/dist-packages
setuptools               59.6.0        /usr/lib/python3/dist-packages
simplejson               3.17.6        /usr/lib/python3/dist-packages
six                      1.16.0        /usr/lib/python3/dist-packages
sniffio                  1.3.0         /home/myPC/.local/lib/python3.10/site-packages pip
soupsieve                2.3.1         /usr/lib/python3/dist-packages
stack-data               0.6.2         /home/myPC/.local/lib/python3.10/site-packages pip
starlette                0.21.0        /home/myPC/.local/lib/python3.10/site-packages pip
sympy                    1.11.1        /home/myPC/.local/lib/python3.10/site-packages pip
systemd-python           234           /usr/lib/python3/dist-packages
tifffile                 2023.2.3      /home/myPC/.local/lib/python3.10/site-packages pip
tokenizers               0.13.2        /home/myPC/.local/lib/python3.10/site-packages pip
toml                     0.10.2        /home/myPC/.local/lib/python3.10/site-packages pip
tomli                    2.0.1         /home/myPC/.local/lib/python3.10/site-packages pip
toolz                    0.12.0        /home/myPC/.local/lib/python3.10/site-packages pip
torch                    1.13.1        /home/myPC/.local/lib/python3.10/site-packages pip
tqdm                     4.64.1        /home/myPC/.local/lib/python3.10/site-packages pip
traitlets                5.9.0         /home/myPC/.local/lib/python3.10/site-packages pip
transformers             4.26.1        /home/myPC/.local/lib/python3.10/site-packages pip
typing                   3.7.4.3       /home/myPC/.local/lib/python3.10/site-packages pip
typing_extensions        4.5.0         /home/myPC/.local/lib/python3.10/site-packages pip
ubuntu-advantage-tools   8001          /usr/lib/python3/dist-packages
ubuntu-drivers-common    0.0.0         /usr/lib/python3/dist-packages
uc-micro-py              1.0.1         /home/myPC/.local/lib/python3.10/site-packages pip
ufw                      0.36.1        /usr/lib/python3/dist-packages
unattended-upgrades      0.1           /usr/lib/python3/dist-packages
urllib3                  1.26.5        /usr/lib/python3/dist-packages
usb-creator              0.3.7         /usr/lib/python3/dist-packages
uvicorn                  0.20.0        /home/myPC/.local/lib/python3.10/site-packages pip
vboxapi                  1.0           /usr/lib/python3/dist-packages
wadllib                  1.3.6         /usr/lib/python3/dist-packages
watchdog                 2.2.1         /home/myPC/.local/lib/python3.10/site-packages pip
wcwidth                  0.2.6         /home/myPC/.local/lib/python3.10/site-packages pip
webencodings             0.5.1         /usr/lib/python3/dist-packages
websockets               10.4          /home/myPC/.local/lib/python3.10/site-packages pip
Werkzeug                 1.0.1         /home/myPC/.local/lib/python3.10/site-packages pip
wheel                    0.37.1        /usr/lib/python3/dist-packages
whichcraft               0.6.1         /home/myPC/.local/lib/python3.10/site-packages pip
xdg                      5             /usr/lib/python3/dist-packages
xkit                     0.0.0         /usr/lib/python3/dist-packages
yacs                     0.1.8         /home/myPC/.local/lib/python3.10/site-packages pip
yarl                     1.8.2         /home/myPC/.local/lib/python3.10/site-packages pip
yt-dlp                   2022.4.8      /usr/lib/python3/dist-packages
zipp                     1.0.0         /usr/lib/python3/dist-packages

@Ofnuts

I am not sure where to look. I have rembg installed
Reply
#5
I found the lama-cleaner requirements here:
https://github.com/Sanster/lama-cleaner/...ements.txt

These are the rembg requiremnts:
https://github.com/danielgatis/rembg/blo...ements.txt

The use of python by AI apps has caused a new version of 'dll-hell' Smile
Reply
#6
Thanks. Does it mean

pip uninstall {each lama requirement}

I can let go of rembg if required. I do not use it much.
Reply
#7
Totally unrelated but since you have Flask, Jinja, Werkzeug, ItsDangerous and MarkupSafe, known collectively as the Flask framework, you have installed something that runs a web server from your PC. Did you really intend this?
Reply
#8
I do not remember installing Flask. Lama Cleaner has a web GUI. Related to that?

I do not have any active custom Python projects ( other than rembg). I can let the all go if it is easier. Thanks.
Reply
#9
(02-20-2023, 09:38 AM)meetdilip Wrote: I do not remember installing Flask. Lama Cleaner has a web GUI. Related to that?

Could explain it.
Reply
#10
Thanks, would be great if there is some 2-3 commands to recover lost space.
Reply


Forum Jump: