 <p>The genpath answer works for <code>fragment*</code> cases, but not a <code>*fragment*</code> case.</p> <p>Clunky, but works:</p> <pre><code>pathlist = path; pathArray = strsplit(pathlist,';'); numPaths = numel(pathArray); for n = 1:numPaths testPath = char(pathArray(n)) isMatching = strfind(testPath,'pathFragment') if isMatching rmpath(testPath); end end </code></pre>