Proxmox VE Post Install no-nag-script on 8.4.5 does not disable subscription nag #1306

Closed
opened 2026-02-05 00:14:26 +03:00 by OVERLORD · 49 comments
Owner

Originally created by @rickyboone on GitHub (Jul 19, 2025).

Have you read and understood the above guidelines?

yes

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

post-pve-install

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

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.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.

Testing PVE 8.4.5 in a home lab, and noticed that the subscription nag reappeared after rebooting and logging in again.

Deleting /etc/apt/apt.conf.d/no-nag-script and rerunning the post-pve-install helper script does not remove the subscription nag. Manually running the sed command in that script shows that it skips over the line it would be editing. I haven't had a chance to fully troubleshoot why it isn't working yet, but was able to manually apply the changes to /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js it would have applied.

🔄 Steps to reproduce the issue.

  • Have PVE 8.4.1 with post-pve-install and no-nag applied
  • Update from 8.4.1 to 8.4.5 (in my case) and reboot
  • Logged out and logged back into admin web interface
  • Receive "You do not have a valid subscription for this server" after login

Paste the full error output (if available).

No visible error.

🖼️ Additional context (optional).

No response

Originally created by @rickyboone on GitHub (Jul 19, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? post-pve-install ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.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. Testing PVE 8.4.5 in a home lab, and noticed that the subscription nag reappeared after rebooting and logging in again. Deleting /etc/apt/apt.conf.d/no-nag-script and rerunning the post-pve-install helper script does not remove the subscription nag. Manually running the sed command in that script shows that it skips over the line it would be editing. I haven't had a chance to fully troubleshoot why it isn't working yet, but was able to manually apply the changes to /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js it would have applied. ### 🔄 Steps to reproduce the issue. * Have PVE 8.4.1 with post-pve-install and no-nag applied * Update from 8.4.1 to 8.4.5 (in my case) and reboot * Logged out and logged back into admin web interface * Receive "You do not have a valid subscription for this server" after login ### ❌ Paste the full error output (if available). No visible error. ### 🖼️ Additional context (optional). _No response_
OVERLORD added the bug label 2026-02-05 00:14:26 +03:00
Author
Owner

@luckman212 commented on GitHub (Jul 19, 2025):

Yes, the sed command is failing to match for some reason

852bfbd71c/tools/pve/post-pve-install.sh (L144)

@luckman212 commented on GitHub (Jul 19, 2025): Yes, the sed command is failing to match for some reason https://github.com/community-scripts/ProxmoxVE/blob/852bfbd71c0a4247c396552d8efd85e5dadaafeb/tools/pve/post-pve-install.sh#L144
Author
Owner

@aperezva commented on GitHub (Jul 19, 2025):

Same to me, impossible to remove banner in my 4 nodes.

@aperezva commented on GitHub (Jul 19, 2025): Same to me, impossible to remove banner in my 4 nodes.
Author
Owner

@Chuaser commented on GitHub (Jul 19, 2025):

same ...
You do not have a valid subscription for this server. Please visit www.proxmox.com to get a list of available options.

@Chuaser commented on GitHub (Jul 19, 2025): same ... You do not have a valid subscription for this server. Please visit [www.proxmox.com](https://www.proxmox.com/en/proxmox-virtual-environment/pricing) to get a list of available options.
Author
Owner

@MickLesk commented on GitHub (Jul 19, 2025):

Maybe next week

@MickLesk commented on GitHub (Jul 19, 2025): Maybe next week
Author
Owner

@stanthewizzard commented on GitHub (Jul 19, 2025):

same

@stanthewizzard commented on GitHub (Jul 19, 2025): same
Author
Owner

@Lewis8265 commented on GitHub (Jul 19, 2025):

Same

@Lewis8265 commented on GitHub (Jul 19, 2025): Same
Author
Owner

@luckman212 commented on GitHub (Jul 19, 2025):

Until this is fixed upstream, this should work for you guys.

Copy/paste the 2 commands below (one at a time) to each of your nodes

cat <<'EOF' >/etc/apt/apt.conf.d/no-nag-script
DPkg::Post-Invoke { "dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ $? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*active/{s/!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi"; };
EOF
apt --reinstall install proxmox-widget-toolkit && service pveproxy restart
@luckman212 commented on GitHub (Jul 19, 2025): Until this is fixed upstream, this should work for you guys. Copy/paste the 2 commands below (one at a time) to each of your nodes ```bash cat <<'EOF' >/etc/apt/apt.conf.d/no-nag-script DPkg::Post-Invoke { "dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ $? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*active/{s/!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi"; }; EOF ``` ```bash apt --reinstall install proxmox-widget-toolkit && service pveproxy restart ```
Author
Owner

@MickLesk commented on GitHub (Jul 19, 2025):

Until this is fixed upstream, this should work for you guys.

Copy/paste the 2 commands below (one at a time) to each of your nodes

cat <<'EOF' >/etc/apt/apt.conf.d/no-nag-script
DPkg::Post-Invoke { "dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ $? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*active/{s/!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi"; };
EOF
apt --reinstall install proxmox-widget-toolkit && service pveproxy restart

If you have a Solution, feel free to make an PR, I'm always busy renovating at the weekend, so I'm rarely on the PC 😅

@MickLesk commented on GitHub (Jul 19, 2025): > Until this is fixed upstream, this should work for you guys. > > Copy/paste the 2 commands below (one at a time) to each of your nodes > > ```bash > cat <<'EOF' >/etc/apt/apt.conf.d/no-nag-script > DPkg::Post-Invoke { "dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ $? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*active/{s/!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi"; }; > EOF > ``` > > ```bash > apt --reinstall install proxmox-widget-toolkit && service pveproxy restart > ``` If you have a Solution, feel free to make an PR, I'm always busy renovating at the weekend, so I'm rarely on the PC 😅
Author
Owner

@alwillha commented on GitHub (Jul 19, 2025):

After the workaround, the same message still appears when you click on "Updates" - "Refresh" in the GUI.
At least on my installation.

@alwillha commented on GitHub (Jul 19, 2025): After the workaround, the same message still appears when you click on "Updates" - "Refresh" in the GUI. At least on my installation.
Author
Owner

@tremor021 commented on GitHub (Jul 19, 2025):

you have to clear cache of the browser after applying the patch. i even had to reboot the node

@tremor021 commented on GitHub (Jul 19, 2025): you have to clear cache of the browser after applying the patch. i even had to reboot the node
Author
Owner

@luckman212 commented on GitHub (Jul 19, 2025):

If you have a Solution, feel free to make an PR, I'm always busy renovating at the weekend, so I'm rarely on the PC 😅

Looks like @imcrazytwkr beat me to it (with a better solution) in #6084

@luckman212 commented on GitHub (Jul 19, 2025): > If you have a Solution, feel free to make an PR, I'm always busy renovating at the weekend, so I'm rarely on the PC 😅 Looks like @imcrazytwkr beat me to it (with a better solution) in #6084
Author
Owner

@MickLesk commented on GitHub (Jul 19, 2025):

It is merged, can you (the affected) check if it works? Don't forget cache clearing and restart.

@MickLesk commented on GitHub (Jul 19, 2025): It is merged, can you (the affected) check if it works? Don't forget cache clearing and restart.
Author
Owner

@luckman212 commented on GitHub (Jul 19, 2025):

LGTM

@luckman212 commented on GitHub (Jul 19, 2025): LGTM
Author
Owner

@kraizelburg commented on GitHub (Jul 19, 2025):

It is merged, can you (the affected) check if it works? Don't forget cache clearing and restart.

Hi, it doenst work for me I cleared the cache and cookies executed the post install script again, reboot but still can see the pop up. Thanks

@kraizelburg commented on GitHub (Jul 19, 2025): > It is merged, can you (the affected) check if it works? Don't forget cache clearing and restart. Hi, it doenst work for me I cleared the cache and cookies executed the post install script again, reboot but still can see the pop up. Thanks
Author
Owner

@MickLesk commented on GitHub (Jul 19, 2025):

More then 1 node?

@MickLesk commented on GitHub (Jul 19, 2025): More then 1 node?
Author
Owner

@alwillha commented on GitHub (Jul 19, 2025):

Hi, it doenst work for me I cleared the cache and cookies executed the post install script again, reboot but still can see the pop up. Thanks

I would say you should remove rm /etc/apt/apt.conf.d/no-nag-script and then run the post install script

see https://github.com/community-scripts/ProxmoxVE/blob/main/tools/pve/post-pve-install.sh#L136

@alwillha commented on GitHub (Jul 19, 2025): > Hi, it doenst work for me I cleared the cache and cookies executed the post install script again, reboot but still can see the pop up. Thanks I would say you should remove _rm /etc/apt/apt.conf.d/no-nag-script_ and then run the post install script see https://github.com/community-scripts/ProxmoxVE/blob/main/tools/pve/post-pve-install.sh#L136
Author
Owner

@kraizelburg commented on GitHub (Jul 19, 2025):

Hi, it doenst work for me I cleared the cache and cookies executed the post install script again, reboot but still can see the pop up. Thanks

I would say you should remove rm /etc/apt/apt.conf.d/no-nag-script and then run the post install script

see https://github.com/community-scripts/ProxmoxVE/blob/main/tools/pve/post-pve-install.sh#L136

Thanks you were 100% correct, honestly I did not know that I had to delete it first. Thanks again

@kraizelburg commented on GitHub (Jul 19, 2025): > > Hi, it doenst work for me I cleared the cache and cookies executed the post install script again, reboot but still can see the pop up. Thanks > > I would say you should remove _rm /etc/apt/apt.conf.d/no-nag-script_ and then run the post install script > > see https://github.com/community-scripts/ProxmoxVE/blob/main/tools/pve/post-pve-install.sh#L136 Thanks you were 100% correct, honestly I did not know that I had to delete it first. Thanks again
Author
Owner

@luckman212 commented on GitHub (Jul 19, 2025):

@MickLesk may I suggest one additional change #6087 to automatically (re)create the dpkg script if it's not the latest one (this would have fixed @kraizelburg issue without needing to manually delete the script...

@luckman212 commented on GitHub (Jul 19, 2025): @MickLesk may I suggest one additional change #6087 to automatically (re)create the dpkg script if it's not the latest one (this would have fixed @kraizelburg issue without needing to manually delete the script...
Author
Owner

@MickLesk commented on GitHub (Jul 19, 2025):

Feel free

@MickLesk commented on GitHub (Jul 19, 2025): Feel free
Author
Owner

@stanthewizzard commented on GitHub (Jul 19, 2025):

Until this is fixed upstream, this should work for you guys.

Copy/paste the 2 commands below (one at a time) to each of your nodes

cat <<'EOF' >/etc/apt/apt.conf.d/no-nag-script
DPkg::Post-Invoke { "dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib.js$'; if [ $? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data.status.*active/{s/!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi"; };
EOF
apt --reinstall install proxmox-widget-toolkit && service pveproxy restart

Works flawlessly
THANKS

@stanthewizzard commented on GitHub (Jul 19, 2025): > Until this is fixed upstream, this should work for you guys. > > Copy/paste the 2 commands below (one at a time) to each of your nodes > > cat <<'EOF' >/etc/apt/apt.conf.d/no-nag-script > DPkg::Post-Invoke { "dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ $? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*data\.status.*active/{s/!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi"; }; > EOF > apt --reinstall install proxmox-widget-toolkit && service pveproxy restart Works flawlessly THANKS
Author
Owner

@EasedVR commented on GitHub (Jul 20, 2025):

The Proxmox Backup Server Post Install script seems to have the same problem.

@EasedVR commented on GitHub (Jul 20, 2025): The Proxmox Backup Server Post Install script seems to have the same problem.
Author
Owner

@alwillha commented on GitHub (Jul 20, 2025):

For PBS I have now used the PVE workaround

echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit 2>/dev/null && [ -f /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\"; };" >/etc/apt/apt.conf.d/no-nag-script

apt --reinstall install proxmox-widget-toolkit

and then reboot PBS, clear browser cache and restart browser

@alwillha commented on GitHub (Jul 20, 2025): For PBS I have now used the PVE workaround `echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit 2>/dev/null && [ -f /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\"; };" >/etc/apt/apt.conf.d/no-nag-script` `apt --reinstall install proxmox-widget-toolkit` and then reboot PBS, clear browser cache and restart browser
Author
Owner

@imcrazytwkr commented on GitHub (Jul 20, 2025):

Sorry, completely missed the other scripts. I only use PVE myself and failed to check whether that anti-nag hook is used anywhere else. The fix should be trivial to port to post-pbs-install.sh and post-pmg-install.sh, but I'd like to wait for #6087 first so that the fix doesn't have to be ported twice.

@imcrazytwkr commented on GitHub (Jul 20, 2025): Sorry, completely missed the other scripts. I only use PVE myself and failed to check whether that anti-nag hook is used anywhere else. The fix should be trivial to port to `post-pbs-install.sh` and `post-pmg-install.sh`, but I'd like to wait for #6087 first so that the fix doesn't have to be ported twice.
Author
Owner

@memesalot commented on GitHub (Jul 20, 2025):

@MickLesk may I suggest one additional change #6087 to automatically (re)create the dpkg script if it's not the latest one (this would have fixed @kraizelburg issue without needing to manually delete the script...

This is a good idea because the latest "fix" that was released doesn't do that and doesn't fix it on existing installs.

@memesalot commented on GitHub (Jul 20, 2025): > [@MickLesk](https://github.com/MickLesk) may I suggest one additional change [#6087](https://github.com/community-scripts/ProxmoxVE/pull/6087) to automatically (re)create the dpkg script if it's not the latest one (this would have fixed [@kraizelburg](https://github.com/kraizelburg) issue without needing to manually delete the script... This is a good idea because the latest "fix" that was released doesn't do that and doesn't fix it on existing installs.
Author
Owner

@tremor021 commented on GitHub (Jul 20, 2025):

@MickLesk may I suggest one additional change #6087 to automatically (re)create the dpkg script if it's not the latest one (this would have fixed @kraizelburg issue without needing to manually delete the script...

This is a good idea because the latest "fix" that was released doesn't do that and doesn't fix it on existing installs.

It works just fine on my node

@tremor021 commented on GitHub (Jul 20, 2025): > > [@MickLesk](https://github.com/MickLesk) may I suggest one additional change [#6087](https://github.com/community-scripts/ProxmoxVE/pull/6087) to automatically (re)create the dpkg script if it's not the latest one (this would have fixed [@kraizelburg](https://github.com/kraizelburg) issue without needing to manually delete the script... > > This is a good idea because the latest "fix" that was released doesn't do that and doesn't fix it on existing installs. It works just fine on my node
Author
Owner

@memesalot commented on GitHub (Jul 20, 2025):

@MickLesk may I suggest one additional change #6087 to automatically (re)create the dpkg script if it's not the latest one (this would have fixed @kraizelburg issue without needing to manually delete the script...

This is a good idea because the latest "fix" that was released doesn't do that and doesn't fix it on existing installs.

It works just fine on my node

Ver 8.4.5

4 nodes updated, all 4 showing the nag still.

@memesalot commented on GitHub (Jul 20, 2025): > > > [@MickLesk](https://github.com/MickLesk) may I suggest one additional change [#6087](https://github.com/community-scripts/ProxmoxVE/pull/6087) to automatically (re)create the dpkg script if it's not the latest one (this would have fixed [@kraizelburg](https://github.com/kraizelburg) issue without needing to manually delete the script... > > > > > > This is a good idea because the latest "fix" that was released doesn't do that and doesn't fix it on existing installs. > > It works just fine on my node Ver 8.4.5 4 nodes updated, all 4 showing the nag still.
Author
Owner

@vsc55 commented on GitHub (Jul 20, 2025):

Hi,

I'm reopening the issue because although the fix works, I think there's a detail that hasn't been detected.

Now when you run apt-get the console shows this:

Processing triggers for man-db (2.11.2-2) ...
??5??????   /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
Removing subscription nag from UI...

Wouldn't it be better to use "dpkg -V proxmox-widget-toolkit > /dev/null 2>&1" to prevent it from displaying anything on the console?

@vsc55 commented on GitHub (Jul 20, 2025): Hi, I'm reopening the issue because although the fix works, I think there's a detail that hasn't been detected. Now when you run apt-get the console shows this: ```bash Processing triggers for man-db (2.11.2-2) ... ??5?????? /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js Removing subscription nag from UI... ``` Wouldn't it be better to use "dpkg -V proxmox-widget-toolkit > /dev/null 2>&1" to prevent it from displaying anything on the console?
Author
Owner

@memesalot commented on GitHub (Jul 20, 2025):

Hi,

I'm reopening the issue because although the fix works, I think there's a detail that hasn't been detected.

Now when you run apt-get the console shows this:

Processing triggers for man-db (2.11.2-2) ...
??5?????? /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
Removing subscription nag from UI...
Wouldn't it be better to use "dpkg -V proxmox-widget-toolkit > /dev/null 2>&1" to prevent it from displaying anything on the console?

Also seeing this ???? error

@memesalot commented on GitHub (Jul 20, 2025): > Hi, > > I'm reopening the issue because although the fix works, I think there's a detail that hasn't been detected. > > Now when you run apt-get the console shows this: > > Processing triggers for man-db (2.11.2-2) ... > ??5?????? /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js > Removing subscription nag from UI... > Wouldn't it be better to use "dpkg -V proxmox-widget-toolkit > /dev/null 2>&1" to prevent it from displaying anything on the console? Also seeing this ???? error
Author
Owner

@imcrazytwkr commented on GitHub (Jul 20, 2025):

@vsc55 can I ask you which version of ProxMox VE you are running and whether you installed it on top of debian or was it installed from the proxmox distribution ISO?

Asking because I can't reproduce the question marks error/warning you're mentioning on 8.4.0, 8.4.1 or 8.4.5, but all of them were installed from the corresponding ISOs from the website and there's a chance they configure apt/dpkg differently from vanilla Debian.

@imcrazytwkr commented on GitHub (Jul 20, 2025): @vsc55 can I ask you which version of ProxMox VE you are running and whether you [installed it on top of debian](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm) or was it installed from the proxmox distribution ISO? Asking because I can't reproduce the question marks error/warning you're mentioning on 8.4.0, 8.4.1 or 8.4.5, but all of them were installed from the corresponding ISOs from the website and there's a chance they configure apt/dpkg differently from vanilla Debian.
Author
Owner

@vsc55 commented on GitHub (Jul 20, 2025):

Hi @imcrazytwkr,

It's installed with the official Proxmox ISO.
PVE version: 8.4.5

@vsc55 commented on GitHub (Jul 20, 2025): Hi @imcrazytwkr, It's installed with the official Proxmox ISO. PVE version: 8.4.5
Author
Owner

@memesalot commented on GitHub (Jul 20, 2025):

@vsc55 can I ask you which version of ProxMox VE you are running and whether you installed it on top of debian or was it installed from the proxmox distribution ISO?

Asking because I can't reproduce the question marks error/warning you're mentioning on 8.4.0, 8.4.1 or 8.4.5, but all of them were installed from the corresponding ISOs from the website and there's a chance they configure apt/dpkg differently from vanilla Debian.

Not him - but I saw that error until i re-created the /etc/apt/apt.conf.d/no-nag-script

@memesalot commented on GitHub (Jul 20, 2025): > [@vsc55](https://github.com/vsc55) can I ask you which version of ProxMox VE you are running and whether you [installed it on top of debian](https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm) or was it installed from the proxmox distribution ISO? > > Asking because I can't reproduce the question marks error/warning you're mentioning on 8.4.0, 8.4.1 or 8.4.5, but all of them were installed from the corresponding ISOs from the website and there's a chance they configure apt/dpkg differently from vanilla Debian. Not him - but I saw that error until i re-created the /etc/apt/apt.conf.d/no-nag-script
Author
Owner

@vsc55 commented on GitHub (Jul 20, 2025):

@imcrazytwkr, I have updated the script on another node that was not yet updated and the same thing happens.

@vsc55 commented on GitHub (Jul 20, 2025): @imcrazytwkr, I have updated the script on another node that was not yet updated and the same thing happens.
Author
Owner

@imcrazytwkr commented on GitHub (Jul 20, 2025):

I think I get it. The old check dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; ... relied on this error/warning not being outputted to stdout as an indicator that we should patch the file during post-hook. Now that I think about it in less of a rush, I think this whole hook would be better off rewritten into [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo ... && sed .... This way there's no dependency on dpkg and its seemingly inconsistent (for me) stdout output at all.

@vsc55 if you don't mind, can you try this hook and tell me whether it works for you correctly without producing any garbage output during APT operations?

DPkg::Post-Invoke { "[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"; };

You can use this command to revert the JS file back to stock:

sed -i '/data\.status/{s/\==/!=/;s/NoMoreNagging/active/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
@imcrazytwkr commented on GitHub (Jul 20, 2025): I think I get it. The old check `dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; ...` relied on this error/warning **not** being outputted to stdout as an indicator that we should patch the file during post-hook. Now that I think about it in less of a rush, I think this whole hook would be better off rewritten into `[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo ... && sed ...`. This way there's no dependency on `dpkg` and its seemingly inconsistent (for me) stdout output at all. @vsc55 if you don't mind, can you try this hook and tell me whether it works for you correctly without producing any garbage output during APT operations? ``` DPkg::Post-Invoke { "[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"; }; ``` You can use this command to revert the JS file back to stock: ``` sed -i '/data\.status/{s/\==/!=/;s/NoMoreNagging/active/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ```
Author
Owner

@vsc55 commented on GitHub (Jul 20, 2025):

Hi @imcrazytwkr,

It generates an error, could it be that the post-hook is isolated from the system and does not have access to the files?
sed: can't read /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\: No such file or directory E: Problem executing scripts DPkg::Post-Invoke '\[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\'

@vsc55 commented on GitHub (Jul 20, 2025): Hi @imcrazytwkr, It generates an error, could it be that the post-hook is isolated from the system and does not have access to the files? `sed: can't read /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\: No such file or directory E: Problem executing scripts DPkg::Post-Invoke '\[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js\' `
Author
Owner

@imcrazytwkr commented on GitHub (Jul 20, 2025):

It generates an error, could it be that the post-hook is isolated from the system and does not have access to the files?

That would be weird because if that was the case, sed command that the hook executes would also fail. I'm going to try a couple more options to see which one works.

I got it. The problem is with backslashes. Sinve I've been executing updated post-install script directly against my test proxmox machine, I forgot to remove them from the code block. Here's the working hook. Sorry for the mistake:

DPkg::Post-Invoke { "[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js" };

I've been testing it with sudo apt --reinstall install proxmox-widget-toolkit on 8.4.5 and it seems to work after I've removed the leftover backslashes.

@imcrazytwkr commented on GitHub (Jul 20, 2025): > It generates an error, could it be that the post-hook is isolated from the system and does not have access to the files? That would be weird because if that was the case, sed command that the hook executes would also fail. I'm going to try a couple more options to see which one works. I got it. The problem is with backslashes. Sinve I've been executing updated post-install script directly against my test proxmox machine, I forgot to remove them from the code block. Here's the working hook. Sorry for the mistake: ``` DPkg::Post-Invoke { "[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js" }; ``` I've been testing it with `sudo apt --reinstall install proxmox-widget-toolkit` on 8.4.5 and it seems to work after I've removed the leftover backslashes.
Author
Owner

@vsc55 commented on GitHub (Jul 20, 2025):

Hi @imcrazytwkr,

I have tried it and with sudo apt --reinstall install proxmox-widget-toolkit it does not give an error but when you install or uninstall other programs it gives the error:

E: Problem executing scripts DPkg::Post-Invoke '[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
E: Sub-process returned an error code

Example installed links:

root@pve01:/etc/apt/apt.conf.d# sudo apt --reinstall install proxmox-widget-toolkit
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/225 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 86742 files and directories currently installed.)
Preparing to unpack .../proxmox-widget-toolkit_4.3.12_all.deb ...
Unpacking proxmox-widget-toolkit (4.3.12) over (4.3.12) ...
Setting up proxmox-widget-toolkit (4.3.12) ...
Removing subscription nag from UI...
root@pve01:/etc/apt/apt.conf.d# apt-get remove links
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  liblz1
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  links
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 2,357 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 86739 files and directories currently installed.)
Removing links (2.28-1+b2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for man-db (2.11.2-2) ...
E: Problem executing scripts DPkg::Post-Invoke '[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
E: Sub-process returned an error code
root@pve01:/etc/apt/apt.conf.d# apt-get install links
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  links
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/695 kB of archives.
After this operation, 2,357 kB of additional disk space will be used.
Selecting previously unselected package links.
(Reading database ... 86732 files and directories currently installed.)
Preparing to unpack .../links_2.28-1+b2_amd64.deb ...
Unpacking links (2.28-1+b2) ...
Setting up links (2.28-1+b2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for man-db (2.11.2-2) ...
E: Problem executing scripts DPkg::Post-Invoke '[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js'
E: Sub-process returned an error code
root@pve01:/etc/apt/apt.conf.d# sudo apt --reinstall install proxmox-widget-toolkit
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/225 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 86742 files and directories currently installed.)
Preparing to unpack .../proxmox-widget-toolkit_4.3.12_all.deb ...
Unpacking proxmox-widget-toolkit (4.3.12) over (4.3.12) ...
Setting up proxmox-widget-toolkit (4.3.12) ...
Removing subscription nag from UI...
root@pve01:/etc/apt/apt.conf.d#

You will see that with proxmox-widget-toolkit everything is ok, but with linsk it gives an error.

@vsc55 commented on GitHub (Jul 20, 2025): Hi @imcrazytwkr, I have tried it and with `sudo apt --reinstall install proxmox-widget-toolkit` it does not give an error but when you install or uninstall other programs it gives the error: ``` E: Problem executing scripts DPkg::Post-Invoke '[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js' E: Sub-process returned an error code ``` Example installed links: ```bash root@pve01:/etc/apt/apt.conf.d# sudo apt --reinstall install proxmox-widget-toolkit Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/225 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 86742 files and directories currently installed.) Preparing to unpack .../proxmox-widget-toolkit_4.3.12_all.deb ... Unpacking proxmox-widget-toolkit (4.3.12) over (4.3.12) ... Setting up proxmox-widget-toolkit (4.3.12) ... Removing subscription nag from UI... root@pve01:/etc/apt/apt.conf.d# apt-get remove links Reading package lists... Done Building dependency tree... Done Reading state information... Done The following package was automatically installed and is no longer required: liblz1 Use 'apt autoremove' to remove it. The following packages will be REMOVED: links 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 2,357 kB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 86739 files and directories currently installed.) Removing links (2.28-1+b2) ... Processing triggers for mailcap (3.70+nmu1) ... Processing triggers for man-db (2.11.2-2) ... E: Problem executing scripts DPkg::Post-Invoke '[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js' E: Sub-process returned an error code root@pve01:/etc/apt/apt.conf.d# apt-get install links Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: links 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/695 kB of archives. After this operation, 2,357 kB of additional disk space will be used. Selecting previously unselected package links. (Reading database ... 86732 files and directories currently installed.) Preparing to unpack .../links_2.28-1+b2_amd64.deb ... Unpacking links (2.28-1+b2) ... Setting up links (2.28-1+b2) ... Processing triggers for mailcap (3.70+nmu1) ... Processing triggers for man-db (2.11.2-2) ... E: Problem executing scripts DPkg::Post-Invoke '[ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && echo 'Removing subscription nag from UI...' && sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js' E: Sub-process returned an error code root@pve01:/etc/apt/apt.conf.d# sudo apt --reinstall install proxmox-widget-toolkit Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/225 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 86742 files and directories currently installed.) Preparing to unpack .../proxmox-widget-toolkit_4.3.12_all.deb ... Unpacking proxmox-widget-toolkit (4.3.12) over (4.3.12) ... Setting up proxmox-widget-toolkit (4.3.12) ... Removing subscription nag from UI... root@pve01:/etc/apt/apt.conf.d# ``` You will see that with proxmox-widget-toolkit everything is ok, but with linsk it gives an error.
Author
Owner

@vsc55 commented on GitHub (Jul 20, 2025):

Ok, the error appears when the file already has the fix applied.
That's why it doesn't appear during the reinstall.

@vsc55 commented on GitHub (Jul 20, 2025): Ok, the error appears when the file already has the fix applied. That's why it doesn't appear during the reinstall.
Author
Owner

@imcrazytwkr commented on GitHub (Jul 20, 2025):

You will see that with proxmox-widget-toolkit everything is ok, but with linsk it gives an error.

I see. Thank you for mentioning that. That is indeed a problem with && chaining that I've used. I've rewritten this hook and tested with installing and removing vim on 8.4.5. This one seems to work both on reinstall of widget toolkit and for other packages:

DPkg::Post-Invoke { "if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then echo 'Removing subscription nag from UI...'; sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi" };

Thanks again for your input and help with testing!

@imcrazytwkr commented on GitHub (Jul 20, 2025): > You will see that with proxmox-widget-toolkit everything is ok, but with linsk it gives an error. I see. Thank you for mentioning that. That is indeed a problem with `&&` chaining that I've used. I've rewritten this hook and tested with installing and removing vim on 8.4.5. This one seems to work both on reinstall of widget toolkit and for other packages: ``` DPkg::Post-Invoke { "if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then echo 'Removing subscription nag from UI...'; sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi" }; ``` Thanks again for your input and help with testing!
Author
Owner

@vsc55 commented on GitHub (Jul 20, 2025):

You will see that with proxmox-widget-toolkit everything is ok, but with linsk it gives an error.

I see. Thank you for mentioning that. That is indeed a problem && chaining that I've used. I've rewritten this hook and tested with installing and removing vim on 8.4.5. This one seems to work both on reinstall of widget toolkit and for other packages:

DPkg::Post-Invoke { "if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then echo 'Removing subscription nag from UI...'; sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi" };

Thanks again for your input and help with testing!

You're welcome,
with this last version it's working fine now.

@vsc55 commented on GitHub (Jul 20, 2025): > > You will see that with proxmox-widget-toolkit everything is ok, but with linsk it gives an error. > > I see. Thank you for mentioning that. That is indeed a problem `&&` chaining that I've used. I've rewritten this hook and tested with installing and removing vim on 8.4.5. This one seems to work both on reinstall of widget toolkit and for other packages: > > ``` > DPkg::Post-Invoke { "if [ -s /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js ] && ! grep -q -F 'NoMoreNagging' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; then echo 'Removing subscription nag from UI...'; sed -i '/data\.status/{s/\!/=/;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; fi" }; > ``` > > Thanks again for your input and help with testing! You're welcome, with this last version it's working fine now.
Author
Owner

@imcrazytwkr commented on GitHub (Jul 20, 2025):

@vsc55 I think it would be better for us to continue this discussion here instead of a PR that fixes the hook not being updated on post-install script reruns.

I mean that the new sed syntax is not compatible with older versions of the pve js file.

The only difference in the actual sed command is that it now replaces ! with a = instead of just removing !. Can you give me an example of an old 8.x version of ProxMox where it doesn't work? I honestly haven't tested this change on anything prior to 8.4.0 and if it indeed breaks on 8.0-8.3, it is trivial to revert and I'd rather do it with the rest of the hook fix.

@imcrazytwkr commented on GitHub (Jul 20, 2025): @vsc55 I think it would be better for us to continue this discussion here instead of a PR that fixes the hook not being updated on post-install script reruns. > I mean that the new sed syntax is not compatible with older versions of the pve js file. The only difference in the actual `sed` command is that it now replaces `!` with a `=` instead of just removing `!`. Can you give me an example of an old 8.x version of ProxMox where it doesn't work? I honestly haven't tested this change on anything prior to 8.4.0 and if it indeed breaks on 8.0-8.3, it is trivial to revert and I'd rather do it with the rest of the hook fix.
Author
Owner

@tremor021 commented on GitHub (Jul 20, 2025):

Also seeing this ???? error

btw thats not a error

@tremor021 commented on GitHub (Jul 20, 2025): > Also seeing this ???? error btw thats not a error
Author
Owner

@imcrazytwkr commented on GitHub (Jul 20, 2025):

btw thats not a error

Yes, it is stdout leaking. But to most users who don't want to deal with details of how shell works, it looks like one. It does also break the established UX so worth fixing.

@imcrazytwkr commented on GitHub (Jul 20, 2025): > btw thats not a error Yes, it is stdout leaking. But to most users who don't want to deal with details of how shell works, it looks like one. It does also break the established UX so worth fixing.
Author
Owner

@aperezva commented on GitHub (Jul 20, 2025):

Im litle lost, I Exected this morning the two lines @luckman212 posted,

And now banner has dissapear.

Do I have to do anything else?

@aperezva commented on GitHub (Jul 20, 2025): Im litle lost, I Exected this morning the two lines @luckman212 posted, And now banner has dissapear. Do I have to do anything else?
Author
Owner

@cammclean182 commented on GitHub (Jul 20, 2025):

Hi - have read this and the comments in issue #3932 but still not clear to me how to get rid of the nag.

I have rerun the Proxmox VE Post Install script but still getting the nag and I dont get asked if i want to remove.

I've logged out and cleared cache. Is there anything else that needs to be done that i'm missing? Thanks

@cammclean182 commented on GitHub (Jul 20, 2025): Hi - have read this and the comments in issue #3932 but still not clear to me how to get rid of the nag. I have rerun the Proxmox VE Post Install script but still getting the nag and I dont get asked if i want to remove. I've logged out and cleared cache. Is there anything else that needs to be done that i'm missing? Thanks
Author
Owner

@luckman212 commented on GitHub (Jul 20, 2025):

@cammclean182 just a guess, but I think you probably have to delete the existing hook script (try rm /etc/apt/apt.conf.d/no-nag-script)— or wait for https://github.com/community-scripts/ProxmoxVE/pull/6098 to be merged— and then re-run the script.

@luckman212 commented on GitHub (Jul 20, 2025): @cammclean182 just a guess, but I think you probably have to delete the existing hook script (try `rm /etc/apt/apt.conf.d/no-nag-script`)— or wait for https://github.com/community-scripts/ProxmoxVE/pull/6098 to be merged— and then re-run the script.
Author
Owner

@panzer-arc commented on GitHub (Jul 27, 2025):

I've tried the commands in this thread and the latest script but am still getting this nag. Anyone else?

@panzer-arc commented on GitHub (Jul 27, 2025): I've tried the commands in this thread and the latest script but am still getting this nag. Anyone else?
Author
Owner

@MickLesk commented on GitHub (Jul 27, 2025):

Reboot and Cache clear Like the whiptail it say...

@MickLesk commented on GitHub (Jul 27, 2025): Reboot and Cache clear Like the whiptail it say...
Author
Owner

@panzer-arc commented on GitHub (Jul 27, 2025):

It was the browser cache causing it. Thanks.

@panzer-arc commented on GitHub (Jul 27, 2025): It was the _browser_ cache causing it. Thanks.
Author
Owner

@Stooovie commented on GitHub (Jul 29, 2025):

It does remove the nag when accessing the GUI but not when clicking Update-Refresh. And yes, I did reboot the host and clean browser cache.

@Stooovie commented on GitHub (Jul 29, 2025): It does remove the nag when accessing the GUI but not when clicking Update-Refresh. And yes, I did reboot the host and clean browser cache.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1306