Yes it is very similar to dieting. Generally people get Bored/Nervous/Sad/Angry and try to eliminate that emotion with a hit of dopamine via some external input like Food/Sex/Drugs/Entertainment instead of recognizing the emotion and dealing with it another way Meditation/Mindfulness/Therapy/Fixing a Life problem.
Removing all carbs from your home forces you to get out of the house to get junk food. During that time or because of the effort involved you may be able to control your emotions and make a better decision. The problem with porn is that it is so easy to get another way Phone, Another computer, saved locally on your hard drive.