How to cleanup outdated TYPO3 development projects

comments

typo3 symlink cleanup project development

During development of different TYPO3 projects I've forgotten to clean up the development directory regularly. So, after a while I even forgot which TYPO3 version was used by each project. To see the target of the source symlink the find command is very useful. The following gist snippet is a reminder to myself and maybe it's even useful for you!

# assume your development projects are located in /home/your_name/public_html
cd ~/public_html
# show currently extracted typo3_src directories
ls | grep typo3_src
# example output:
# typo3_src-4.3.3
# typo3-src-4.5.2
# assume you want to remove the 4.3.3 src, find projects which are using this src
find . -maxdepth 2 -lname '*4.3.3*'
# example output:
./my-old-project.local/typo3_src
./another-old-project.local/typo3_src
# cleanup, adding sudo for access restricted files & folders (e.g. written by the webserver)
sudo rm -rf my-old-project.local/
sudo rm -rf another-old-project.local/
# cleanup src
rm -rf typo3_src-4.3.3
# disable & remove apache configuration
sudo a2dissite my-old-project.local
sudo a2dissiite another-old-project.local
sudo rm /etc/apache2/sites-available/my-old-project.local
sudo rm /etc/apache2/sites-available/another-old-project.local
# remove databases and db-users (this is done in a GUI tool)
# @todo: add shell commands for this tasks
# reload apache configuration
sudo /etc/init.d/apache2 reload

Comments

comments powered by Disqus