Proxmox VE LXC Cleaner stops with unbound variable error #1393

Closed
opened 2026-02-05 00:36:42 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @j64bit on GitHub (Aug 4, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Proxmox VE LXC Cleaner

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/clean-lxcs.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

Script stops screen reser and showing with error message:
` ________ __ _ ________
/ / / ____ _____ / / | |/ / /
/ / / / _ / __ / __ \ / / | / /
/ /
/ / __/ /
/ / / / / / /
/ / /__
_//_/_,// // /__//|_/

bash: line 59: name: unbound variable
root@pmserver0:~# `

Dont know how to run verbose mode here, sorry.

🔄 Steps to reproduce the issue.

NOTE: error only shows if there LXCs to be skipped.
Run as described.
In dialog to exclude LXCs: leave unchanged (i.e. all included).

Paste the full error output (if available).


/ / / ____ _____ / / | |/ / /
/ / / / _ / __ `/ __ \ / / | / /
/ /
/ / __/ /
/ / / / / / /
/ / /__
_//_/_,// // /__//|_/

bash: line 59: name: unbound variable
root@pmserver0:~#

🖼️ Additional context (optional).

Many thanks to all involved. This project is really super useful and made my local admin life so much easier.

Originally created by @j64bit on GitHub (Aug 4, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Proxmox VE LXC Cleaner ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/clean-lxcs.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. Script stops screen reser and showing with error message: ` ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ / / / / _ \/ __ / __ \ / / | / / / /___/ / __/ /_/ / / / / / /___/ / /___ \____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ bash: line 59: name: unbound variable root@pmserver0:~# ` Dont know how to run verbose mode here, sorry. ### 🔄 Steps to reproduce the issue. NOTE: error only shows if there LXCs to be skipped. Run as described. In dialog to exclude LXCs: leave unchanged (i.e. all included). ### ❌ Paste the full error output (if available). ________ __ _ ________ / ____/ /__ ____ _____ / / | |/ / ____/ / / / / _ \/ __ `/ __ \ / / | / / / /___/ / __/ /_/ / / / / / /___/ / /___ \____/_/\___/\__,_/_/ /_/ /_____/_/|_\____/ bash: line 59: name: unbound variable root@pmserver0:~# ### 🖼️ Additional context (optional). Many thanks to all involved. This project is really super useful and made my local admin life so much easier.
OVERLORD added the bug label 2026-02-05 00:36:42 +03:00
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

Work fine here.

Image Image

Image (last one)

@MickLesk commented on GitHub (Aug 4, 2025): Work fine here. <img width="669" height="328" alt="Image" src="https://github.com/user-attachments/assets/f82da607-923b-4cd0-862a-96abb0822454" /> <img width="548" height="339" alt="Image" src="https://github.com/user-attachments/assets/430e5bbb-63c9-47ab-b439-466cbbba5c86" /> <img width="1012" height="472" alt="Image" src="https://github.com/user-attachments/assets/333cb089-09b2-471a-b789-4179de002331" /> (last one)
Author
Owner

@j64bit commented on GitHub (Aug 4, 2025):

Interesting. Are we using the same script? (md5sum=50551f1bd833acb1208ddff81b9fe2b2)

Line 59 looks like this:
echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is not Debian or Ubuntu ${CL} \n"

${name} is not defined here. And what should it contain? The name of the container is in $container.
${name} is defined and use in the previous function clean_container from hostname. But not defined in the scope of line 59.

Ah, guess you don't have any LXCs to be skipped!
I have added this to the description now.

Note: my skills on bash are basic only

@j64bit commented on GitHub (Aug 4, 2025): Interesting. Are we using the same script? (md5sum=50551f1bd833acb1208ddff81b9fe2b2) Line 59 looks like this: ` echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container is not Debian or Ubuntu ${CL} \n"` ${name} is not defined here. And what should it contain? The name of the container is in $container. ${name} is defined and use in the previous `function clean_container` from hostname. But not defined in the scope of line 59. Ah, guess you don't have any LXCs to be skipped! I have added this to the description now. Note: my skills on bash are basic only
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

you have alpine containers to skip?

@MickLesk commented on GitHub (Aug 4, 2025): you have alpine containers to skip?
Author
Owner

@MickLesk commented on GitHub (Aug 4, 2025):

Can you try the dev build?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/tools/pve/clean-lxcs.sh)"
@MickLesk commented on GitHub (Aug 4, 2025): Can you try the dev build? ```bash bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/tools/pve/clean-lxcs.sh)" ```
Author
Owner

@j64bit commented on GitHub (Aug 6, 2025):

Yes, and that works very nicely! Thanks
I also looks different and kindly asks before starting an offline LXC - great!

@j64bit commented on GitHub (Aug 6, 2025): Yes, and that works very nicely! Thanks I also looks different and kindly asks before starting an offline LXC - great!
Author
Owner

@MickLesk commented on GitHub (Aug 6, 2025):

so this version runs better? Then i can prepare an PR Later for Live

@MickLesk commented on GitHub (Aug 6, 2025): so this version runs better? Then i can prepare an PR Later for Live
Author
Owner

@j64bit commented on GitHub (Aug 6, 2025):

Yes, no more errors or stops of the script - issue resolved. From my side a green light to release it.
Many thanks!

@j64bit commented on GitHub (Aug 6, 2025): Yes, no more errors or stops of the script - issue resolved. From my side a green light to release it. Many thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1393