paste replace?

My first time asking a question here, I apologize if I’m doing it incorrectly. I want to describe the situation and then see if anybody knows how to do it.

Say that I have selected about 60 seconds of a drum track of a song. I want to take that 60 seconds of drum track and put it in a different place in the same drum track.

I think it would go like this…

I select and then COPY the portion of the drum track that I want to paste somewhere else in the song.
I pick the spot where I want the beginning of the COPY to occur.
Then I Initiate some command that will take my selected portion of drum track and REPLACE only the part of the existing track that the selected portion of drum track “covers”. I want my selected section to replace only as much of the track as it uses.

I don NOT want to INSERT the selected portion, I want to overwrite the existing with the selected portion.

I hope that my question is clear.

Select the audio that you want to replace, and then “paste”.

If I understood correctly, for example, you copy 60s of drum, but select a 35s part of the track and, when pasting, you want to paste only 35s (the amount of the track selected).

If that’s the case, Punch Copy-Paste plugin is for you, from Steve: https://forum.audacityteam.org/t/punch-copy-paste/28906/1

(For doing what you want then, you need “punch copy” and “punch paste” from the plugin, not ctrl+c and ctrl+v. Instructions in the official post there, but easy!)

Sometimes I PASTE the desired portion into a new track just below the point where I want to replace. That sets up guide lines. Now I can select exactly that section of of audio in the original track using the yellow guide lines. Then, just PASTE into the original track and delete the temporary track. See: Boundary Snap Guides