I need to clean up my server from PHP 5.3 packages (there are plenty of them) in order to be able to compile PHP 5.2. What is the easiest/safest method to get rid of them all?
asked Sep 3, 2011 at 17:59
This method is not advised to be used without careful review. Read below comments. This should completely remove any package with a name that starts with
DON'T PRESS
If so, type
T.Todua 4891 gold badge4 silver badges14 bronze badges answered Sep 3, 2011 at 18:07
RobinJRobinJ 8,5688 gold badges45 silver badges69 bronze badges 16 I do not recommend running That was
scary! Fortunately, I didn't type the
How it works: First, a list of packages is generated using this series of commands: Hint: You can run this part of the command in your terminal to see what packages would get removed. You should get something like: Finally, when you run the full command, this list of packages gets passed to sudo apt-get purge, removing all of the packages. Hint: If it feels safer to you, you could just as easily run them separately, and copy+paste the list of packages to remove like so:
answered Sep 13, 2012 at 10:20
bentobento 1,1611 gold badge7 silver badges2 bronze badges 5
You'll probably want to purge all the php* packages from your system. Something with a wild-card should work
You may be interested in How to rollback to PHP 5.2 for where to go next.
answered Sep 3, 2011 at 18:06
Marco CeppiMarco Ceppi 47.3k29 gold badges170 silver badges197 bronze badges 3 First, you have to remove Apache and all of its dependencies with:
and then:
If you have any issues with phpMyAdmin, try entering this into the Terminal:
techraf 3,28610 gold badges25 silver badges37 bronze badges answered Apr 1, 2016 at 6:41
1
In your case, you could search for all the packages:
and then purge them:
Eric Carvalho 52.6k102 gold badges134 silver badges161 bronze badges answered Jan 29, 2013 at 13:14
2 In addition to any purges mentioned in the other answers, if you want to be completely sure everything is removed, you're likely to want to run
Which will show you files/folders with the name php in them. You're then going to want to check each of these file paths, i.e.:
And delete them as is appropriate. Be careful not to delete anything that's critical to another process you need to keep running, though, unless you want to have to reinstall that too. To remove a directory, or file, we use the
answered Jan 12, 2017 at 16:56
The regex the two people said is incorrect. Thats the right answer. Although I dont recommend using this method cause its highly automated and I encourge you to use
answered Sep 7, 2017 at 14:43
2
Explanation
If necessary
answered Jun 24, 2020 at 10:56
I use answered Nov 20, 2021 at 5:20
First I
run answered Jan 24 at 11:31
|