Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[PROBLEM] How to uninstall fail2ban? it fails with errors.
Thank you for your donation

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Problem: How to uninstall fail2ban? it fails with errors.
2nd Jul, 2024, 04:42 AM
Post: #1
postcd Offline
Registered
Posts: 31
Joined: Nov 2021
Reputation: 0
How to uninstall fail2ban? it fails with errors.
I have installed fail2ban: http://forum.xbian.org/thread-4178-post-37899.html#pid37899 (now closed Sleepy)
But it can't uninstall now (as per the output)

Quote:dpkg: error processing package fail2ban (--remove):
installed fail2ban package pre-removal script subprocess returned error exit status 1

Running on BCM2711 with XBian 12.0 - Bullseye, kernel: Linux ARM 32-bit version 6.1.66+

Please what to try?

UPDATE:
I have prefixed three lines of the second "if" confition in /var/lib/dpkg/info/fail2ban.prerm by character "#" and then it removed the package without "pre-removal script" error. Thanks
Visit this user's website Find all posts by this user
17th Jul, 2024, 06:23 PM
Post: #2
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: How to uninstall fail2ban? it fails with errors.
A bit late, but there are snapshots for such cases. Simply revert to the snapshot that was created before file2ban was installed.

Another alternative would be to comment out the command that produces the error in the maintenance script and try again. I have had to do this several times, Theese scripts are located in /var/lib/dpkg/info/, in your case files /var/lib/dpkg/info/fail2ban*

hth
Find all posts by this user
23rd Jul, 2024, 04:43 PM
Post: #3
jamegreatjame Offline
Registered
Posts: 3
Joined: Jul 2024
Reputation: 0
RE: How to uninstall fail2ban? it fails with errors.
(17th Jul, 2024 06:23 PM)Nachteule Wrote:  A bit late, but there are snapshots for such cases. Simply revert to the snapshot that was created before file2ban was installed.

Another alternative would be to comment out the command that produces the error in the maintenance script and try again. I have had to do this several times, Theese scripts are located in /var/lib/dpkg/info/, in your case files /var/lib/dpkg/info/fail2ban*

hth

Yes, It is really helpful, thank you for sharing this tip.
Find all posts by this user
9th Oct, 2024, 02:02 PM
Post: #4
sarausa0106 Offline
Banned
Posts: 2
Joined: Oct 2024
RE: How to uninstall fail2ban? it fails with errors.
If you already have other security measures in place (such as firewalls, VPNs, or other security software), you may feel that Fail2Ban is no longer necessary. Suika game
Find all posts by this user
3rd Dec, 2024, 11:53 AM
Post: #5
asher Offline
Banned
Posts: 2
Joined: Dec 2024
RE: How to uninstall fail2ban? it fails with errors.
(17th Jul, 2024 06:23 PM)Nachteule bitlife Wrote:  A bit late, but there are snapshots for such cases. Simply revert to the snapshot that was created before file2ban was installed.

Another alternative would be to comment out the command that produces the error in the maintenance script and try again. I have had to do this several times, Theese scripts are located in /var/lib/dpkg/info/, in your case files /var/lib/dpkg/info/fail2ban*

hth

Thanks for sharing the solution! The idea of ​​using snapshots and editing scripts is beneficial and practical in situations like this.
Find all posts by this user
8th Mar, 2025, 07:06 PM
Post: #6
Alice12 Offline
Banned
Posts: 1
Joined: Aug 2024
RE: How to uninstall fail2ban? it fails with errors.
If the uninstall fails with errors, you might need to manually remove Fail2Ban files
Love Pawsona
Find all posts by this user
21st Mar, 2025, 12:31 PM
Post: #7
oliviawilde168 Offline
Banned
Posts: 1
Joined: Mar 2025
RE: How to uninstall fail2ban? it fails with errors.
(17th Jul, 2024 06:23 PM)Nachteule Wrote:  A bit late, but there are snapshots for such cases. Simply revert to the snapshot that was created before file2ban was installed.

Another alternative would be to comment out the command that produces the error in the maintenance script and try again. I have had to do this several times, Theese scripts are located in /var/lib/dpkg/info/, in your case files /var/lib/dpkg/info/fail2ban* cookie clicker

hth
Before commenting out a command, try to understand its purpose. If it's crucial for the package's functionality, you'll need to find a proper solution, not just bypass the error.
Find all posts by this user
19th May, 2025, 08:28 PM
Post: #8
Chinmayi Offline
Banned
Posts: 1
Joined: May 2025
RE: How to uninstall fail2ban? it fails with errors.
(2nd Jul, 2024 04:42 AM)postcd Wrote:  I have installed fail2ban: http://forum.xbian.org/thread-4178-post-37899.html#pid37899 (now closed Sleepy)
But it can't uninstall now (as per the output)crossy road

Quote:dpkg: error processing package fail2ban (--remove):
installed fail2ban package pre-removal script subprocess returned error exit status 1

Running on BCM2711 with XBian 12.0 - Bullseye, kernel: Linux ARM 32-bit version 6.1.66+

Please what to try?

UPDATE:
I have prefixed three lines of the second "if" confition in /var/lib/dpkg/info/fail2ban.prerm by character "#" and then it removed the package without "pre-removal script" error. Thanks
What are the potential risks or implications of modifying the fail2ban.prerm script to successfully uninstall the package, and are there safer alternatives to resolve the uninstall errors?
Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 26th May, 2025, 02:58 AM Powered By MyBB, © 2002-2025 MyBB Group.