user25737: 
How do I reduce the length on the Time Ruler in order to make the composition shorter in duration?

user1950: There's no built - in function that does it, but there's a script for that. I wrote one called first-n-last, it's available (free, open source) here https://blob.pureandapplied.com.au/
Alternatively, park your playhead at the beginning of the first layer (select that layer and hit i), then set the start of the work area to that frame by hitting b then select the last layer and hit go to the last frame (hit o) and set the end of the work area to that frame by hitting n. Now right click the work area and choose trim comp to work area from the contextual menu. This doesn't work for layers that extend beyond the beginning or end of the comp, but my srcipt does.

user26665: You can do what @stib said. Use the B and N shortcuts to set the beginning and end of the work area to match your footage. Another good shortcut is  Shift and X to cut the timeline to the current work area. 

25737: <p><a href="https://i.stack.imgur.com/Z3uCE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z3uCE.png" alt="enter image description here"></a></p>

<p>How do I reduce the length on the Time Ruler in order to make the composition shorter in duration?</p>
 1950: <p>There's no built - in function that does it, but there's a script for that. I wrote one called first-n-last, it's available (free, open source) here <a href="https://blob.pureandapplied.com.au/" rel="nofollow noreferrer">https://blob.pureandapplied.com.au/</a></p>

<p>Alternatively, park your playhead at the beginning of the first layer (select that layer and hit <kbd>i</kbd>), then set the start of the work area to that frame by hitting <kbd>b</kbd> then select the last layer and hit go to the last frame (hit <kbd>o</kbd>) and set the end of the work area to that frame by hitting <kbd>n</kbd>. Now right click the work area and choose <strong>trim comp to work area</strong> from the contextual menu. This doesn't work for layers that extend beyond the beginning or end of the comp, but my srcipt does.</p>
 26665: <p>You can do what @stib said. Use the B and N shortcuts to set the beginning and end of the work area to match your footage. Another good shortcut is  Shift and X to cut the timeline to the current work area. </p>
